dotfiles/fish/install.sh

35 lines
968 B
Bash
Raw Normal View History

2020-09-17 10:24:35 +00:00
#!/bin/bash
DIR=$(readlink -f $(dirname $0))
. $DIR/../env.sh
# install fish shell
2020-09-17 16:02:24 +00:00
echo Installing fish shell
2020-09-17 10:24:35 +00:00
case "$PM" in
apt)
2020-09-17 16:02:24 +00:00
! which pip3 && $ROOT/python/install.sh
2020-09-17 10:24:35 +00:00
sudo add-apt-repository ppa:fish-shell/release-3 -y
sudo apt update
sudo apt install fish libnotify-bin xdotool -y
;;
pacman)
2020-09-17 16:02:24 +00:00
! which pip && $ROOT/python/install.sh
2020-09-18 18:01:58 +00:00
sudo pacman -S --needed --needed fish xdotool
2020-09-17 10:24:35 +00:00
;;
esac
# set fish as default shell
2020-09-17 16:02:24 +00:00
if ! fish-is-default-shell; then
2020-09-17 10:24:35 +00:00
chsh -s $FISH_SHELL
fi
# symlink config
2020-09-17 16:02:24 +00:00
[ -L ~/.config/fish ] && rm -rf ~/.config/fish
lnsf $DIR/config/config.fish ~/.config/fish/config.fish
lnsf $DIR/config/functions/fish_prompt.fish ~/.config/fish/functions/fish_prompt.fish
lnsf $DIR/config/functions/fish_right_prompt.fish ~/.config/fish/functions/fish_right_prompt.fish
2020-09-18 18:01:58 +00:00
lnsf $DIR/config/functions/fisher.fish ~/.config/fish/functions/fisher.fish
source ~/.config/fish/config.fish