# Adds the official Fish repository sudo apt-add-repository ppa:fish-shell/release-3 -y # Updates the list sudo apt update # Install Fish, fzf (for the reverse search), bat (for the colored manuals), procps (for the SSH), curl (for downloading scripts) sudo apt install fish fzf bat procps curl -y echo -e "\nFish installed!" # Fish default shell sudo chsh -s /usr/bin/fish $USER # Removing motd fish -c 'set -U fish_greeting' # Install ^R (reversed research) curl -sL https://git.io/fisher | fish -c 'source && fisher install jorgebucaran/fisher' fish -c 'fisher install jethrokuan/fzf' # Install SSH rm $HOME/.config/fish/functions/fish_ssh_agent.fish 2>/dev/null; wget https://gitlab.com/kyb/fish_ssh_agent/raw/master/functions/fish_ssh_agent.fish -P $HOME/.config/fish/functions/ # Update the fish config with mine (edit that once installed for you) rm $HOME/.config/fish/config.fish 2>/dev/null; wget https://git.kennel.ml/Anri/myLinuxConfiguration/raw/branch/main/.config/fish/config.fish -P $HOME/.config/fish/ # Update the prompt with mine rm $HOME/.config/fish/functions/fish_prompt.fish 2>/dev/null; wget https://git.kennel.ml/Anri/myLinuxConfiguration/raw/branch/main/.config/fish/functions/fish_prompt.fish -P $HOME/.config/fish/functions/ # Updating color scheme (based on Base16 Eighties) fish -c 'set -U fish_color_normal normal' fish -c 'set -U fish_color_command 99cc99' fish -c 'set -U fish_color_quote ffcc66' fish -c 'set -U fish_color_redirection d3d0c8' fish -c 'set -U fish_color_end cc99cc' fish -c 'set -U fish_color_error f2777a' fish -c 'set -U fish_color_param d3d0c8' fish -c 'set -U fish_color_comment ffcc66' fish -c 'set -U fish_color_match 6699cc' fish -c 'set -U fish_color_selection white --bold --background=brblack' fish -c 'set -U fish_color_search_match bryellow --background=brblack' fish -c 'set -U fish_color_history_current --bold' fish -c 'set -U fish_color_operator 6699cc' fish -c 'set -U fish_color_escape 66cccc' fish -c 'set -U fish_color_cwd green' fish -c 'set -U fish_color_cwd_root red' fish -c 'set -U fish_color_valid_path --underline' fish -c 'set -U fish_color_autosuggestion 747369' fish -c 'set -U fish_color_user brgreen' fish -c 'set -U fish_color_host normal' fish -c 'set -U fish_color_cancel -r' fish -c 'set -U fish_pager_color_completion normal' fish -c 'set -U fish_pager_color_description B3A06D yellow' fish -c 'set -U fish_pager_color_prefix normal --bold --underline' fish -c 'set -U fish_pager_color_progress brwhite --background=cyan' # Adding abbrevations fish -c "abbr ls 'ls -lh'" fish -c "abbr cp 'cp -rv'" fish -c "abbr rm 'rm -rf'" fish -c "abbr gcc 'gcc -Wall -Wextra -fanalyzer -g'" fish -c "abbr activate 'source bin/activate.fish'" fish -c "abbr vs 'code .'" fish -c "abbr untgz 'tar -xvzf'" fish -c "abbr - 'cd -'" if grep "WSL" /proc/version > /dev/null; # only for WSL then fish -c "abbr bigupdate 'sudo apt update && sudo apt upgrade -y && sudo apt full-upgrade -y && sudo apt autoremove -y && wget -q --show-progress https://git.kennel.ml/Anri/myLinuxConfiguration/raw/branch/main/update.sh -O tmp_u.sh && bash tmp_u.sh; rm tmp_u.sh'" fish -c "abbr d 'explorer.exe .'" else # if regular distro (i.e. Ubuntu) fish -c "abbr bigupdate 'sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo snap refresh && wget -q --show-progress https://git.kennel.ml/Anri/myLinuxConfiguration/raw/branch/main/update.sh -O tmp_u.sh && bash tmp_u.sh; rm tmp_u.sh'" fish -c "abbr d 'nautilus . -w &> /dev/null & disown'" fish -c "abbr spotify 'LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify &> /dev/null & disown'" fi if grep "Ubuntu" /proc/version > /dev/null; # only for Ubuntu then # We remove the Ubuntu desktop shortcut only if it already exists if [ -f /usr/share/applications/fish.desktop ] then sudo mv /usr/share/applications/fish.desktop /usr/share/applications/fish.desktop.bak echo -e "\nFish icon removed!" fi fi echo -e "\nFish configured! 🎉" echo "You must log out to finish applying the changes."