mirror of
https://codeberg.org/diginaut/dotfiles.git
synced 2026-09-19 16:39:06 +02:00
Reflowed; Added question to install the Fisher plugin manager
This commit is contained in:
+35
-12
@@ -1,8 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# inspired by rrix' dotfiles
|
# inspired by rrix' dotfiles
|
||||||
|
|
||||||
install_fish()
|
install_fish() {
|
||||||
{
|
|
||||||
touch ~/.dot/.dot_has_fish
|
touch ~/.dot/.dot_has_fish
|
||||||
mkdir -p "${HOME}/.config/fish/completions"
|
mkdir -p "${HOME}/.config/fish/completions"
|
||||||
curl -sL get.fisherman.sh | fish
|
curl -sL get.fisherman.sh | fish
|
||||||
@@ -12,14 +11,23 @@ install_fish()
|
|||||||
ln -s "${HOME}/workspace/application_addons/cli/tmuxinator/completion/mux.fish" "${HOME}/.config/fish/completions"
|
ln -s "${HOME}/workspace/application_addons/cli/tmuxinator/completion/mux.fish" "${HOME}/.config/fish/completions"
|
||||||
ln -s "${HOME}/workspace/application_addons/cli/tmuxinator/completion/tmuxinator.fish" "${HOME}/.config/fish/completions"
|
ln -s "${HOME}/workspace/application_addons/cli/tmuxinator/completion/tmuxinator.fish" "${HOME}/.config/fish/completions"
|
||||||
echo
|
echo
|
||||||
echo "You might want to install Fisher:"
|
echo "Do you wish to install the Fisher plugin manager? This will do:"
|
||||||
echo "curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher"
|
echo "curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher"
|
||||||
echo "fisher update"
|
echo "fisher update"
|
||||||
echo
|
echo
|
||||||
|
select yn in "Yes" "No"; do
|
||||||
|
case $yn in
|
||||||
|
Yes)
|
||||||
|
curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
|
||||||
|
fisher update
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
No) break ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
make_link()
|
make_link() {
|
||||||
{
|
|
||||||
DIR="$1"
|
DIR="$1"
|
||||||
TARGET="$2"
|
TARGET="$2"
|
||||||
cd || exit
|
cd || exit
|
||||||
@@ -66,8 +74,7 @@ cd || exit
|
|||||||
mkdir -p .config/direnv
|
mkdir -p .config/direnv
|
||||||
|
|
||||||
# Symlink all the things
|
# Symlink all the things
|
||||||
for TARGET in .bash_aliases .bashrc bin .gitconfig .gitignore_global .gitmodules .hgauthors.txt .hgignore .hgrc .ideavimrc .ignore .screenrc .terminfo .tmux.conf .vim .vimrc install.sh .config/direnv/direnvrc .config/nvim
|
for TARGET in .bash_aliases .bashrc bin .gitconfig .gitignore_global .gitmodules .hgauthors.txt .hgignore .hgrc .ideavimrc .ignore .screenrc .terminfo .tmux.conf .vim .vimrc install.sh .config/direnv/direnvrc .config/nvim; do
|
||||||
do
|
|
||||||
make_link $DIR $TARGET
|
make_link $DIR $TARGET
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -89,8 +96,14 @@ elif [ ! -e ~/.dot/.dot_no_fish ]; then
|
|||||||
echo "Do you wish to install fish shell configuration?"
|
echo "Do you wish to install fish shell configuration?"
|
||||||
select yn in "Yes" "No"; do
|
select yn in "Yes" "No"; do
|
||||||
case $yn in
|
case $yn in
|
||||||
Yes ) install_fish; break;;
|
Yes)
|
||||||
No ) touch ~/.dot/.dot_no_fish; break;;
|
install_fish
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
No)
|
||||||
|
touch ~/.dot/.dot_no_fish
|
||||||
|
break
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@@ -99,7 +112,11 @@ echo
|
|||||||
echo "Do you wish to install the starship prompt?"
|
echo "Do you wish to install the starship prompt?"
|
||||||
select yn in "Yes" "No"; do
|
select yn in "Yes" "No"; do
|
||||||
case $yn in
|
case $yn in
|
||||||
Yes ) make_link $DIR ".config/starship.toml"; curl -sS https://starship.rs/install.sh | sh; break;;
|
Yes)
|
||||||
|
make_link $DIR ".config/starship.toml"
|
||||||
|
curl -sS https://starship.rs/install.sh | sh
|
||||||
|
break
|
||||||
|
;;
|
||||||
No) break ;;
|
No) break ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@@ -109,8 +126,14 @@ if [ ! -e ~/.dot_is_server ] && [ ! -e ~/.dot_no_server ]; then
|
|||||||
echo "Is this machine a server?"
|
echo "Is this machine a server?"
|
||||||
select yn in "Yes" "No"; do
|
select yn in "Yes" "No"; do
|
||||||
case $yn in
|
case $yn in
|
||||||
Yes ) touch ~/.dot_is_server; break;;
|
Yes)
|
||||||
No ) touch ~/.dot_no_server; break;;
|
touch ~/.dot_is_server
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
No)
|
||||||
|
touch ~/.dot_no_server
|
||||||
|
break
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user