From 38e36997b87336a3add7d1648e29135fa4eed776 Mon Sep 17 00:00:00 2001 From: Phantop Date: Fri, 5 Jul 2024 17:14:38 -0400 Subject: [PATCH] fish: refactor around setup.fish and universal vars --- bin/setup | 2 +- bin/{aliases => setup.fish} | 35 ++++++++++++++++++++++++++++++++--- fish/config.fish | 30 +++--------------------------- 3 files changed, 36 insertions(+), 31 deletions(-) rename bin/{aliases => setup.fish} (83%) diff --git a/bin/setup b/bin/setup index 158f989..cb5c090 100755 --- a/bin/setup +++ b/bin/setup @@ -17,7 +17,7 @@ echo options lsm=landlock,lockdown,yama,integrity,apparmor,bpf | s tee -a /boot/ mkdir -p ~/.parallel/will-cite ~/.config/aria2 stow --no-folding -d ~/.dotfiles -t ~/.config . -fish -c "aliases" +~/.dotfiles/bin/setup.fish w https://github.com/dracula/kitty/raw/master/dracula.conf -P ~/.config/kitty w https://github.com/dracula/musikcube/raw/main/dracula.json -P ~/.config/musikcube/themes diff --git a/bin/aliases b/bin/setup.fish similarity index 83% rename from bin/aliases rename to bin/setup.fish index fb999f6..debd5bf 100755 --- a/bin/aliases +++ b/bin/setup.fish @@ -2,16 +2,45 @@ rm -r ~/.config/fish/* stow --no-folding -d ~/.dotfiles -t ~/.config/fish fish +fish_add_path -U ~/{.dotfiles,.local,Games}/bin /usr/lib64/ccache/bin +fish_add_path -U ~/.local/appdwarf/{,apps{,/bin}} + +set -Ux EDITOR nvim +set -Ux GTK_THEME Dracula +set -Ux MANPAGER 'nvim +Man!' +set -Ux NNN_PLUG 'f:fzcd;i:imgur;j:autojump;m:nmount;s:imgview' +set -Ux PAGER most +set -Ux QT_QPA_PLATFORMTHEME qt5ct +set -Ux USE_CCACHE 1 + +set -U fish_features all +set -U fish_greeting +set -U fish_color_command --bold +set -U fish_color_comment red +set -U fish_color_end brmagenta +set -U fish_color_error brred +set -U fish_color_escape 'bryellow' '--bold' +set -U fish_color_match --background=brblue +set -U fish_color_operator bryellow +set -U fish_color_param cyan +set -U fish_color_quote yellow +set -U fish_color_redirection brblue +set -U fish_color_status red +set -U fish_color_user brgreen +set -U fish_color_valid_path --underline +set -U fish_pager_color_prefix 'white' '--bold' '--underline' + curl -sL https://git.io/fisher | source fisher install {jorgebucaran/replay,PatrickF1/fzf}.fish -fish_update_completions + ln -s /usr/share/autojump/autojump.fish ~/.config/fish/conf.d -set -U fish_features all starship init fish --print-full-init > ~/.config/fish/conf.d/starship.fish +fish_update_completions + alias a 'alias -s' a acmus 'timeout (math 60 - (date +%M))m mpv --loop https://acmusicext.com/static/$argv/sunny/(date +%-I%P).ogg' -a aliases 'v (env which aliases); command aliases' +a aliases 'v (which setup.fish); command setup.fish' a all2jxl 'fd -e{png,jpg,ppm,gif} -x cjxl -e 8 -d 0 {} {.}.jxl \; -x rm' a awall 'xwinwrap -fdt -fs -- mpv -wid WID ~/Pictures/Wall/Anim/$argv* --loop --no-osc' a base64d 'echo (echo $argv | base64 -d 2>/dev/null) | tee /dev/stderr 2>| clip;:' diff --git a/fish/config.fish b/fish/config.fish index 97d212d..f6c6b3c 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -1,32 +1,8 @@ -fish_add_path -g ~/{.dotfiles,.local{/appdwarf,},Games}/bin /usr/lib64/ccache/bin -fish_add_path -g ~/.local/appdwarf/apps -export EDITOR=nvim MANPAGER='nvim +Man!' USE_CCACHE=1 PAGER=most -export QT_QPA_PLATFORMTHEME=qt5ct GTK_THEME=Dracula -export NNN_PLUG='f:fzcd;i:imgur;j:autojump;m:nmount;s:imgview' - -set fish_greeting -set fish_color_command --bold -set fish_color_comment red -set fish_color_end brmagenta -set fish_color_error brred -set fish_color_escape 'bryellow' '--bold' -set fish_color_match --background=brblue -set fish_color_operator bryellow -set fish_color_param cyan -set fish_color_quote yellow -set fish_color_redirection brblue -set fish_color_status red -set fish_color_user brgreen -set fish_color_valid_path --underline -set fish_pager_color_prefix 'white' '--bold' '--underline' - -bind \ed 'ncdu' -bind \ef '_fzf_wrapper | clip' -bind \e\co 'open (_fzf_wrapper)' - abbr !. --position anywhere -f history_find -r '^!.*' abbr !! --position anywhere -f history_last abbr do '' abbr done end - +bind \ed 'ncdu' +bind \ef '_fzf_wrapper | clip' +bind \e\co 'open (_fzf_wrapper)' printf "\e[5 q"