From: Andre Ramnitz Date: Thu, 13 Aug 2026 17:33:50 +0000 (+0200) Subject: fish: update config and aliases X-Git-Tag: v0.6~8 X-Git-Url: https://git.ramnitz.eu/?a=commitdiff_plain;h=e3e6f953fef7320ed1d8cb69318e54b6cf78f3a9;p=dotfiles.git fish: update config and aliases --- diff --git a/dot-config/fish/completions/wl-freeze.fish b/dot-config/fish/completions/wl-freeze.fish new file mode 120000 index 0000000..a5c2d5e --- /dev/null +++ b/dot-config/fish/completions/wl-freeze.fish @@ -0,0 +1 @@ +/media/source/wl-freeze/completions/fish/wl-freeze.fish \ No newline at end of file diff --git a/dot-config/fish/config.fish b/dot-config/fish/config.fish index e051af1..ed85777 100644 --- a/dot-config/fish/config.fish +++ b/dot-config/fish/config.fish @@ -1,14 +1,19 @@ if status is-interactive + # read all vendor completions in /usr/share/fish/vendor_completions.d/ + for f in /usr/share/fish/vendor_completions.d/*.fish; source $f; end + # Commands to run in interactive sessions can go here - # + __fish_cursor_xterm line + thefuck --alias | source source ~/.config/fish/functions/eza-aliases.fish source ~/.config/fish/functions/git-aliases.fish set EZA_COLORS "*.patch.skip=38;5;244" - command -v fastfetch && command fastfetch -c ~/.config/fastfetch/default.jsonc - source (starship init fish --print-full-init | psub) set -gx EDITOR 'kak' set -gx VISUAL 'kak' zoxide init fish | source + starship init fish | source + # source (starship init fish --print-full-init | psub) + # command -v fastfetch && command fastfetch -c ~/.config/fastfetch/default.jsonc set -g fish_greeting end diff --git a/dot-config/fish/functions/eza-aliases.fish b/dot-config/fish/functions/eza-aliases.fish index ab248ea..894a5da 100644 --- a/dot-config/fish/functions/eza-aliases.fish +++ b/dot-config/fish/functions/eza-aliases.fish @@ -3,53 +3,53 @@ function l1 --wraps='eza' --description='alias eza' switch (tty | cut -f1-3 -d'/') case /dev/tty - EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza --group --group-directories-first -1 $argv + EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza --group --group-directories-first -1 -- $argv case /dev/pts - EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza --group --group-directories-first -1 $argv + EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza --group --group-directories-first -1 -- $argv end end function ls --wraps='eza' --description='alias eza' switch (tty | cut -f1-3 -d'/') case /dev/tty - EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza --group-directories-first --icons $argv + EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza --group-directories-first --icons -- $argv case /dev/pts - EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza --group-directories-first --icons $argv + EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza --group-directories-first --icons -- $argv end end function la --wraps='eza' --description='alias eza' switch (tty | cut -f1-3 -d'/') case /dev/tty - EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza -a --group --group-directories-first --icons -l $argv + EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza -a --group --group-directories-first --icons -l -- $argv case /dev/pts - EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza -a --group --group-directories-first --icons -l $argv + EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza -a --group --group-directories-first --icons -l -- $argv end end function lg --wraps='eza' --description='alias eza' switch (tty | cut -f1-3 -d'/') case /dev/tty - EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza --long --no-user --smart-group --group-directories-first --git $argv + EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza --long --no-user --smart-group --group-directories-first --git -- $argv case /dev/pts - EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza --long --no-user --smart-group --group-directories-first --git $argv + EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza --long --no-user --smart-group --group-directories-first --git -- $argv end end function ll --wraps='eza' --description='alias eza' switch (tty | cut -f1-3 -d'/') case /dev/tty - EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza --group --group-directories-first --icons -l $argv + EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza --group --group-directories-first --icons -l --grid --header -- $argv case /dev/pts - EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza --group --group-directories-first --icons -l $argv + EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza --group --group-directories-first --icons -l --grid --header -- $argv end end function lt --wraps='eza' --description='alias eza' switch (tty | cut -f1-3 -d'/') case /dev/tty - EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza --group --long --grid --group-directories-first --sort=mod -t=mod --time-style=long-iso $argv + EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza --group --long --grid --group-directories-first --sort=mod -t=mod --time-style=long-iso -- $argv case /dev/pts - EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza --group --long --grid --group-directories-first --sort=mod -t=mod --time-style=long-iso $argv + EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza --group --long --grid --group-directories-first --sort=mod -t=mod --time-style=long-iso -- $argv end end diff --git a/dot-config/fish/functions/fish_prompt.fish b/dot-config/fish/functions/fish_prompt.fish deleted file mode 100644 index e203972..0000000 --- a/dot-config/fish/functions/fish_prompt.fish +++ /dev/null @@ -1,29 +0,0 @@ -function fish_prompt - switch "$fish_key_bindings" - case fish_hybrid_key_bindings fish_vi_key_bindings fish_helix_key_bindings - set STARSHIP_KEYMAP "$fish_bind_mode" - case '*' - set STARSHIP_KEYMAP insert - end - - set STARSHIP_CMD_PIPESTATUS $pipestatus - set STARSHIP_CMD_STATUS $status - # Account for changes in variable name between v2.7 and v3.0 - set STARSHIP_DURATION "$CMD_DURATION$cmd_duration" - - __starship_set_job_count - - if test "$TRANSIENT" = "1" - set -g TRANSIENT 0 - # Clear from cursor to end of screen as `commandline -f repaint` does not do this - # See https://github.com/fish-shell/fish-shell/issues/8418 - printf \e\[0J - if type -q starship_transient_prompt_func - starship_transient_prompt_func --terminal-width="$COLUMNS" --status=$STARSHIP_CMD_STATUS --pipestatus="$STARSHIP_CMD_PIPESTATUS" --keymap=$STARSHIP_KEYMAP --cmd-duration=$STARSHIP_DURATION --jobs=$STARSHIP_JOBS - else - printf "\e[1;32m❯\e[0m " - end - else - /usr/bin/starship prompt --terminal-width="$COLUMNS" --status=$STARSHIP_CMD_STATUS --pipestatus="$STARSHIP_CMD_PIPESTATUS" --keymap=$STARSHIP_KEYMAP --cmd-duration=$STARSHIP_DURATION --jobs=$STARSHIP_JOBS - end -end diff --git a/dot-config/fish/functions/hyprconfig.fish b/dot-config/fish/functions/hyprconfig.fish deleted file mode 100644 index 8c507dc..0000000 --- a/dot-config/fish/functions/hyprconfig.fish +++ /dev/null @@ -1,3 +0,0 @@ -function hyprconfig --wraps='kks edit ~/.config/hypr/hypr*.conf ~/.config/hypr/noctalia/*.conf ~/.config/hypr/fragments/* ' --description 'alias hyprconfig=kak ~/.config/hypr/hypr*.conf ~/.config/hypr/noctalia/*.conf ~/.config/hypr/fragments/* ' - kak ~/.config/hypr/hypr*.conf ~/.config/hypr/noctalia/*.conf ~/.config/hypr/fragments/* $argv -end