diff --git a/fish/config/config.fish b/fish/config/config.fish index d6c39d5..9dc88d6 100644 --- a/fish/config/config.fish +++ b/fish/config/config.fish @@ -107,7 +107,7 @@ end # auto startx if test -z "$STARTED" -a -z "$DISPLAY" -a -n "$XDG_VTNR" -a "$XDG_VTNR" -eq "1" set -gx STARTED true - startx + exec startx end if status is-interactive diff --git a/fish/install.sh b/fish/install.sh index 12400a4..d55eb02 100755 --- a/fish/install.sh +++ b/fish/install.sh @@ -10,7 +10,7 @@ case "$PM" in ! which pip3 && $ROOT/python/install.sh sudo add-apt-repository ppa:fish-shell/release-3 -y sudo apt update - sudo apt install fish libnotify-bin xdotool silversearcher-ag -y + sudo apt install fish libnotify-bin xdotool silversearcher-ag dash -y if apt show fzf &>/dev/null; then sudo apt install fzf elif ! which fzf &>/dev/null; then @@ -20,14 +20,30 @@ case "$PM" in ;; pacman) ! which pip && $ROOT/python/install.sh - sudo pacman -S --needed --needed fish xdotool fzf the_silver_searcher + sudo pacman -S --needed --needed fish xdotool fzf the_silver_searcher dash + # prevent bash upgradation relink /bin/sh + sudo mkdir -p /etc/pacman.d/hooks + cat <<-EOT | sed 's/^ *//' | sudo tee /etc/pacman.d/sh-is-dash.hook + [Trigger] + Type = Package + Operation = Install + Operation = Upgrade + Target = bash + + [Action] + Description = Re-pointing /bin/sh symlink to dash... + When = PostTransaction + Exec = /usr/bin/ln -sfT dash /usr/bin/sh + Depends = dash + EOT ;; esac -# set fish as default shell -if ! fish-is-default-shell; then - chsh -s $FISH_SHELL -fi +# use dash as default shell because it much faster and will be used vim-fugitive, +# which leads to a much faster responsive speed +sudo /usr/bin/ln -sfT dash /usr/bin/sh +chsh -s /bin/sh + # symlink config [ -L $XDG_CONFIG_HOME/fish ] && rm -rf $XDG_CONFIG_HOME/fish diff --git a/nodejs/install.sh b/nodejs/install.sh index cf0a240..5781efa 100755 --- a/nodejs/install.sh +++ b/nodejs/install.sh @@ -32,7 +32,7 @@ fi # install nvm -if fish-is-default-shell; then +if which fish 2>/dev/null; then fish -c "fisher add jorgebucaran/nvm.fish" else curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash diff --git a/python/install.sh b/python/install.sh index 7a717e7..b34bb8d 100755 --- a/python/install.sh +++ b/python/install.sh @@ -16,15 +16,15 @@ fi case "$PM" in apt) sudo apt install python3 python3-pip python-is-python3 - fish-is-default-shell && sudo pip3 install virtualfish + which fish 2>/dev/null && sudo pip3 install virtualfish ;; pacman) sudo pacman -S --needed python python-pip - fish-is-default-shell && sudo pip install virtualfish + which fish 2>/dev/null && sudo pip install virtualfish ;; esac # enable auto_activation plugin for virtualfish -fish-is-default-shell && fish -c "yes | vf install && vf addplugins auto_activation" +which fish 2>/dev/null && fish -c "yes | vf install && vf addplugins auto_activation"