diff --git a/src/.config/fish/aliases.fish b/src/.config/fish/aliases.fish index 1440cba..7ca66b1 100644 --- a/src/.config/fish/aliases.fish +++ b/src/.config/fish/aliases.fish @@ -1,22 +1,11 @@ -# Color ls -alias ls='ls --color=auto' - # Run mpv from clipboard -alias mpvy='mpv (xsel -b)' - -alias youtube-dl='youtube-dl -f "bestvideo[ext=mp4][height<=?1080]+bestaudio[ext=m4a]"' - -# Send screenshots to my VM -alias scr='scp ~/med/screen/latest.png boron:~' +function mpvy; mpv (xsel -b); end # Set gpg tty so curses pinentry works -alias gpgt='export GPG_TTY=(tty)' - -# Remove newlines from clipboard (for competitive programming) -alias dnl='xsel -b | tr "\n" " " | xsel -ib' +function gpgt; export GPG_TTY=(tty); end # Private neovim -alias nvimp='nvim -u NONE -c "setlocal history=0 nobackup nomodeline noshelltemp noswapfile noundofile nowritebackup secure viminfo=\"\""' +function nvimp; nvim -u NONE -c "setlocal history=0 nobackup nomodeline noshelltemp noswapfile noundofile nowritebackup secure viminfo=\"\""; end # Read pdf file as text function pdfr @@ -24,11 +13,11 @@ function pdfr end # Neomutt configs -alias neomutt.local='neomutt -F .config/neomutt/neomuttrc.local' -alias neomutt.disroot='neomutt -F .config/neomutt/neomuttrc.disroot' +function neomutt.local; neomutt -F .config/neomutt/neomuttrc.local; end +function neomutt.disroot; neomutt -F .config/neomutt/neomuttrc.disroot; end # Specific to my Gentoo system -alias genlop='doas -u portage /usr/bin/genlop' -alias loginctl='doas /bin/loginctl' +function genlop; doas -u portage /usr/bin/genlop; end +function loginctl; doas /bin/loginctl; end -alias pyenv='source ~/dox/proj/ref/venv/bin/activate.fish' +function pyenv; source ~/dox/proj/ref/venv/bin/activate.fish; end diff --git a/src/.config/fish/config.fish b/src/.config/fish/config.fish index f2dc0a9..654a383 100644 --- a/src/.config/fish/config.fish +++ b/src/.config/fish/config.fish @@ -1,12 +1,5 @@ -if status is-interactive - # Commands to run in interactive sessions can go here -end - source ~/.config/fish/aliases.fish -source ~/.config/fish/functions/prompts.fish -source ~/.config/fish/functions/extra_prompt.fish - # Set GPG_TTY gpgt @@ -23,10 +16,11 @@ set -gx MANPATH "$MANPATH:/home/dogeystamp/.cache/cppman/" # Disable fish greeting set fish_greeting "" -# Enable Vi bindings -fish_vi_key_bindings +source ~/.config/fish/functions/prompts.fish +source ~/.config/fish/functions/extra_prompt.fish -bind -M insert \cf accept-autosuggestion +# Enable Vi bindings +fish_hybrid_key_bindings set __fish_git_prompt_showdirtystate 1 set __fish_git_prompt_showupstream auto