From 5663dc04e63beada3e5ad4d904a5f61c2ab9a6e9 Mon Sep 17 00:00:00 2001 From: PieckA Date: Sat, 25 May 2024 18:18:45 +0200 Subject: [PATCH] bugfixing.. --- config.fish | 10 +-------- functions/setup.fish | 52 +++++++++++++++----------------------------- 2 files changed, 18 insertions(+), 44 deletions(-) diff --git a/config.fish b/config.fish index 2d5a441..5c51fda 100644 --- a/config.fish +++ b/config.fish @@ -161,18 +161,10 @@ else curl -sS https://starship.rs/install.sh | sh && exec fish end -set colorscheme for bobthefish +# ─< set colorscheme for bobthefish >─────────────────────────────────────────────────────── if test -d $HOME/.config/fish/functions/ set -g theme_nerd_fonts yes set -g defaults_user (echo $USER) # available options: dark, light, solarized(-dark/-light), base16(-dark/-light), zenburn, gruvbox(-light), dracula, nord, catppuccin-(latte/frappe/macchiato/mocha) set -g theme_color_scheme catppuccin-mocha end - -set -a TOOLBOX "$warnings - -$toolbox - -$ALIASSES - -" diff --git a/functions/setup.fish b/functions/setup.fish index 01348f7..24e8890 100644 --- a/functions/setup.fish +++ b/functions/setup.fish @@ -154,11 +154,13 @@ end # ╰───────────────────────────────────────────────────╯ if command -v tmux >/dev/null 2>&1 function ta - if command tmux list-sessions >/dev/null 2>&1 + command tmux list-sessions >/dev/null 2>&1 + switch $status + case 0 echo "Tmux session found. Entering it now! --" sleep 0.5 tmux a - else + case '*' echo "No Tmux session found. Creating one now! --" tmux end @@ -171,7 +173,6 @@ end function dep_fisher # Define dependencies for the plugins used by fisher set dependencies "fzf" - # Check and install dependencies for dep in $dependencies if not command -v $dep >/dev/null 2>&1 @@ -195,40 +196,21 @@ function inst_fisher end function check_fisher - switch $CHECK_FISHER - case true - fisher update - case '*' - if test ! -e $HOME/.config/fish/functions/fisher.fish - curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish >> $HOME/.config/fish/functions/fisher.fish - else - fisher update >/dev/null 2>&1 - switch $status - case 0 - set -U CHECK_FISHER "true" - case '*' + while $check_fisher != "true" + echo "check_fisher == flase" + sleep 1 + # if $check_fisher = "true" + fisher update >/dev/null 2>&1 + switch $status + case 0 + set -U check_fisher "true" + echo "check_fisher == true" + sleep 1 + case '*' + if test ! -e $HOME/.config/fish/functions/fisher.fish + curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish >> $HOME/.config/fish/functions/fisher.fish inst_fisher end end end end - -# ╭──────────────────────────────────╮ -# │ FUNCTION: install fisher plugins │ -# ╰──────────────────────────────────╯ - -function plugs_fisher - # Define plugins to use with fisher - set plugins "PatrickF1/fzf.fish" "jorgebucaran/autopair.fish" - - # Loop for plugin installation/update - for plugin in $plugins - if fisher list | grep -q (basename $plugin) - fisher update $plugin - echo "Updated $plugin" - else - fisher install $plugin - echo "Installed $plugin" - end - end -end