Merge branches 'upstream-custom' and 'zshfish' into dev

This commit is contained in:
2024-06-07 03:09:40 -04:00
10 changed files with 1937 additions and 142 deletions

6
.install/fish.sh Normal file
View File

@@ -0,0 +1,6 @@
# ------------------------------------------------------
# install fish
# ------------------------------------------------------
packagesPacman=("fish");
packagesYay=();
source .install/install-packages.sh

View File

@@ -14,6 +14,14 @@ _showRestoreOptions() {
restorelist+="~/dotfiles/.bashrc "
selectedlist+="~/dotfiles/.bashrc,"
fi
if [ -f ~/dotfiles/.zshrc ]; then
restorelist+="~/dotfiles/.zshrc "
selectedlist+="~/dotfiles/.zshrc,"
fi
if [ -f ~/dotfiles/.p10k.zsh ]; then
restorelist+="~/dotfiles/.p10k.zsh "
selectedlist+="~/dotfiles/.p10k.zsh,"
fi
if [ -d ~/dotfiles/.settings ]; then
restorelist+="~/dotfiles/.settings "
selectedlist+="~/dotfiles/.settings,"
@@ -24,7 +32,7 @@ _showRestoreOptions() {
then
restorelist+="~/dotfiles/hypr/hypridle.conf "
selectedlist+="~/dotfiles/hypr/hypridle.conf,"
fi
fi
fi
if [ -f ~/dotfiles/hypr/conf/custom.conf ]; then
restorelist+="~/dotfiles/hypr/conf/custom.conf "
@@ -75,13 +83,13 @@ _showRestoreOptions() {
fi
restoreselect=$(gum choose --no-limit --height 20 --cursor-prefix "( ) " --selected-prefix "(x) " --unselected-prefix "( ) " --selected="$selectedlist" $restorelist)
if [ ! -z "$restoreselect" ] ;then
echo "Selected to restore:"
echo "Selected to restore:"
echo "$restoreselect"
echo ""
confirmrestore=$(gum choose "Start restore" "Change restore" "Skip restore")
if [ "$confirmrestore" == "Start restore" ] ;then
_startRestore
elif [ "$confirmrestore" == "Change restore" ]; then
elif [ "$confirmrestore" == "Change restore" ]; then
_showRestoreOptions
else
echo ":: Restore skipped."
@@ -94,7 +102,7 @@ _showRestoreOptions() {
echo ":: Installation canceled."
exit
fi
if [ "$confirmrestore" == "Change restore" ]; then
if [ "$confirmrestore" == "Change restore" ]; then
echo ""
_showRestoreOptions
else
@@ -135,11 +143,11 @@ _startRestore() {
cp ~/dotfiles/hypr/conf/keyboard.conf ~/dotfiles-versions/$version/hypr/conf/
echo ":: Hyprland keyboard.conf restored!"
fi
fi
fi
if [[ $restoreselect == *"~/dotfiles/hypr/conf/monitor.conf"* ]] || [[ $restoreselect == *"All"* ]] ; then
if [ -f ~/dotfiles/hypr/conf/monitor.conf ]; then
cp ~/dotfiles/hypr/conf/monitor.conf ~/dotfiles-versions/$version/hypr/conf/
echo ":: Hyprland monitor.conf restored!"
echo ":: Hyprland monitor.conf restored!"
fi
fi
if [[ $restoreselect == *"~/dotfiles/hypr/conf/keybinding.conf"* ]] || [[ $restoreselect == *"All"* ]] ; then
@@ -153,19 +161,19 @@ _startRestore() {
cp ~/dotfiles/hypr/conf/environment.conf ~/dotfiles-versions/$version/hypr/conf/
echo ":: Hyprland environment.conf restored!"
fi
fi
fi
if [[ $restoreselect == *"~/dotfiles/hypr/conf/layout.conf"* ]] || [[ $restoreselect == *"All"* ]] ; then
if [ -f ~/dotfiles/hypr/conf/layout.conf ]; then
cp ~/dotfiles/hypr/conf/layout.conf ~/dotfiles-versions/$version/hypr/conf/
echo ":: Hyprland layout.conf restored!"
fi
fi
fi
if [[ $restoreselect == *"~/dotfiles/hypr/conf/windowrule.conf"* ]] || [[ $restoreselect == *"All"* ]] ; then
if [ -f ~/dotfiles/hypr/conf/windowrule.conf ]; then
cp ~/dotfiles/hypr/conf/windowrule.conf ~/dotfiles-versions/$version/hypr/conf/
echo ":: Hyprland windowrule.conf restored!"
fi
fi
fi
if [[ $restoreselect == *"~/dotfiles/hypr/conf/animation.conf"* ]] || [[ $restoreselect == *"All"* ]] ; then
if [ -f ~/dotfiles/hypr/conf/animation.conf ]; then
cp ~/dotfiles/hypr/conf/animation.conf ~/dotfiles-versions/$version/hypr/conf/

19
.install/zsh.sh Normal file
View File

@@ -0,0 +1,19 @@
# ------------------------------------------------------
# install zsh and zinit
# ------------------------------------------------------
packagesPacman=("zsh");
echo "Please select the zsh plugin manager:"
zsh_manager=$(gum choose --limit=1 --cursor-prefix "( ) " --selected-prefix "(x) " --unselected-prefix "( ) " "oh my zsh" "zinit")
if [ ${zsh_manager}=="oh my zsh" ]; then
source .install/install-packages.sh
RUNZSH=no CHSH=no sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zdharma-continuum/fast-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fast-syntax-highlighting
_installSymLink zshrc ~/.zshrc ~/dotfiles/.zshrc_ohmyzsh ~
else
packagesYay=("zinit");
source .install/install-packages.sh
_installSymLink zshrc ~/.zshrc ~/dotfiles/.zshrc_zinit ~
fi
_installSymLink p10k ~/.p10k.zsh ~/dotfiles/.p10k.zsh ~

26
.install/zshfish.sh Normal file
View File

@@ -0,0 +1,26 @@
# ------------------------------------------------------
# Select additional shell
# ------------------------------------------------------
echo -e "${GREEN}"
figlet "Zsh Fish"
echo -e "${NONE}"
echo "Please select if you want to install zsh or fish."
echo
zshfish=$(gum choose --no-limit --cursor-prefix "( ) " --selected-prefix "(x) " --unselected-prefix "( ) " "zsh" "fish")
if [ -z "${zshfish}" ] ;then
echo ":: No shell selected. Keep using bash."
else
echo "Please select your default shell."
echo
shell=$(echo "bash\n$zshfish" | gum choose --limit=1 -cursor-prefix "( ) " --selected-prefix "(x) " --unselected-prefix "( ) ")
sudo chsh -s $(which $shell) $(whoami)
if [[ $zshfish == *"zsh"* ]]; then
echo ":: zsh selected"
source .install/zsh.sh
fi
if [[ $zshfish == *"fish"* ]]; then
echo ":: fish selected"
source .install/fish.sh
fi
fi