38 lines
1.1 KiB
Bash
Executable file
38 lines
1.1 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
# Packages
|
|
if [ "$(lsb_release -is)" = "Ubuntu" ]; then
|
|
sudo apt install -y \
|
|
fish \
|
|
fzf \
|
|
fd-find \
|
|
bat
|
|
sudo ln -s /usr/bin/batcat /usr/local/bin/bat
|
|
sudo ln -s /usr/bin/fdfind /usr/local/bin/fd
|
|
fi
|
|
if [ "$(lsb_release -is)" = "Debian" ]; then
|
|
# We could script this, but it's probably easier to just install it manually..
|
|
# Basically just grab the binaries, chown to root, and put them into /usr/local/bin/
|
|
if ! [ -x "$(command -v fzf)" ] || ! [ -x "$(command -v fd)" ] || ! [ -x "$(command -v bat)" ]; then
|
|
echo "Please install dependencies from https://github.com/PatrickF1/fzf.fish#installation"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
|
|
# Default shell
|
|
chsh -s /usr/bin/fish
|
|
|
|
|
|
# Plugins
|
|
rm -f ~/.config/fish/functions/fish_prompt.fish # clean existing prompt for pure prompt
|
|
cat <<EOF | fish
|
|
# Fish fzf
|
|
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
|
|
fisher install PatrickF1/fzf.fish
|
|
fisher install pure-fish/pure
|
|
EOF
|
|
ln -sr config.fish ~/.config/fish/config.fish
|