#set fish_greeting "Welcome to the fish shell!" set fish_greeting "$(date)" #set fish_greeting "" set -gx EDITOR micro # Aliases alias mc='micro' alias ls='ls --color=auto' alias grep='grep --color=auto' alias lls='ls -l' alias llsa='ls -lA' alias cp='cp --verbose' alias mv='mv --verbose' alias rm='rm --verbose' alias rsync='rsync --progress' alias ucp="cp --update" alias netstat='sudo netstat' alias ss='sudo ss' alias sss='sudo ss -tunlp4' alias ds='docker ps' alias tree='tree -ahlfvC' alias yay-clean-up='yay -Qtdq | yay -Rns -' alias refresh-mirrors='sudo reflector --protocol https --verbose --latest 25 --sort rate --save /etc/pacman.d/mirrorlist' alias refresh-mirrors-eos='sudo eos-rankmirrors --verbose' alias journal-clean='journalctl --vacuum-time=4weeks' alias paccache-clean='paccache -ruk0' # Hibernate and restart aliases alias hibernate='systemctl suspend' alias restart='sudo shutdown -r now' # Prompt customization function fish_prompt set -l last_status $status set -l cyan (set_color -o cyan) set -l yellow (set_color -o yellow) set -l red (set_color -o red) set -l magenta (set_color -o magenta) set -l green (set_color -o green) set -l normal (set_color normal) echo -n $cyan"┌──("$red(whoami)$cyan"@"$magenta(hostname)$cyan")-["$green(prompt_pwd --full-length-dirs=10)$cyan"]" echo -e "\n"$cyan"└─"$magenta"\$"$normal" " end # Ctrl + Delete function fish_user_key_bindings bind \e\[3\;5~ kill-word end # sudo !! function function sudo if test "$argv" = !! eval command sudo $history[1] else command sudo $argv end end # multi cd .. function multicd echo cd (string repeat -n (math (string length -- $argv[1]) - 1) ../) end abbr --add dotdot --regex '^\.\.+$' --function multicd