configs/install-stuff/install-fish.bash
2024-04-17 21:41:40 -05:00

35 lines
1.1 KiB
Bash
Executable file

#!/usr/bin/env bash
set -e
if [ $(whoami) == "root" ]; then
echo "Run as a normal user, not root"
exit 1
fi
command_exists() { type "$1" &>/dev/null; }
if command_exists "apt-get"; then
sudo apt-get install fish -y
elif command_exists "yum"; then
sudo yum install fish -y
elif command_exists "pacman"; then
yay -S fish
elif command_exists "zypp"; then
# Untested
sudo zypper install fish -y
elif command_exists "emerge"; then
sudo echo Not yet supported, exiting...
exit
elif command_exists "apk"; then
sudo apk add fish
elif command_exists "xbps-install"; then
sudo xbps-install fish-shell -y
else
echo "Unsupported: unknown package manager and distro"
exit
fi
chsh -s $(readlink -f $(which fish))
fish -c "tide configure --auto --style=Classic --prompt_colors='True color' --classic_prompt_color=Dark --show_time='24-hour format' --classic_prompt_separators=Vertical --powerline_prompt_heads=Sharp --powerline_prompt_tails=Flat --powerline_prompt_style='One line' --prompt_spacing=Compact --icons='Many icons' --transient=No"