diff --git a/install.sh b/install.sh index 2f04c9958..c85e22725 100755 --- a/install.sh +++ b/install.sh @@ -158,11 +158,11 @@ v mkdir -p "$HOME"/.{config,cache,local/{bin,share}} # original dotfiles and new ones in the SAME DIRECTORY # (eg. in ~/.config/hypr) won't be mixed together -# MISC (For .config/* but not AGS, not Hyprland) +# MISC (For .config/* but not AGS, not Fish, not Hyprland) case $SKIP_MISCCONF in true) sleep 0;; *) - for i in $(find .config/ -mindepth 1 -maxdepth 1 ! -name 'ags' ! -name 'hypr' -exec basename {} \;); do + for i in $(find .config/ -mindepth 1 -maxdepth 1 ! -name 'ags' ! -name 'fish' ! -name 'hypr' -exec basename {} \;); do i=".config/$i" echo "[$0]: Found target: $i" if [ -d "$i" ];then v rsync -av --delete "$i/" "$HOME/$i/" @@ -172,6 +172,13 @@ case $SKIP_MISCCONF in ;; esac +case $SKIP_FISH in + true) sleep 0;; + *) + v rsync -av --delete .config/fish/ "$HOME"/.config/fish/ + ;; +esac + # For AGS case $SKIP_AGS in true) sleep 0;; @@ -191,24 +198,29 @@ case $SKIP_AGS in esac # For Hyprland -v rsync -av --delete --exclude '/custom' --exclude '/hyprland.conf' .config/hypr/ "$HOME"/.config/hypr/ -t="$HOME/.config/hypr/hyprland.conf" -if [ -f $t ];then - echo -e "\e[34m[$0]: \"$t\" already exists.\e[0m" - v cp -f .config/hypr/hyprland.conf $t.new - existed_hypr_conf=y -else - echo -e "\e[33m[$0]: \"$t\" does not exist yet.\e[0m" - v cp .config/hypr/hyprland.conf $t - existed_hypr_conf=n -fi -t="$HOME/.config/hypr/custom" -if [ -d $t ];then - echo -e "\e[34m[$0]: \"$t\" already exists, will not do anything.\e[0m" -else - echo -e "\e[33m[$0]: \"$t\" does not exist yet.\e[0m" - v rsync -av --delete .config/hypr/custom/ $t/ -fi +case $SKIP_HYPRLAND in + true) sleep 0;; + *) + v rsync -av --delete --exclude '/custom' --exclude '/hyprland.conf' .config/hypr/ "$HOME"/.config/hypr/ + t="$HOME/.config/hypr/hyprland.conf" + if [ -f $t ];then + echo -e "\e[34m[$0]: \"$t\" already exists.\e[0m" + v cp -f .config/hypr/hyprland.conf $t.new + existed_hypr_conf=y + else + echo -e "\e[33m[$0]: \"$t\" does not exist yet.\e[0m" + v cp .config/hypr/hyprland.conf $t + existed_hypr_conf=n + fi + t="$HOME/.config/hypr/custom" + if [ -d $t ];then + echo -e "\e[34m[$0]: \"$t\" already exists, will not do anything.\e[0m" + else + echo -e "\e[33m[$0]: \"$t\" does not exist yet.\e[0m" + v rsync -av --delete .config/hypr/custom/ $t/ + fi + ;; +esac # some foldes (eg. .local/bin) should be processed separately to avoid `--delete' for rsync, diff --git a/scriptdata/options b/scriptdata/options index d5c2fcd08..83b8e2193 100644 --- a/scriptdata/options +++ b/scriptdata/options @@ -15,7 +15,9 @@ If no option is specified, run default install process. -c, --clean Clean the build cache first -s, --skip-sysupdate Skip \"sudo pacman -Syu\" --skip-ags Skip installing ags and its config - --skip-miscconf Skip copying the dirs and files to \".configs\" except for AGS and Hyprland + --skip-hyprland Skip installing the config for Hyprland + --skip-fish Skip installing the config for Fish + --skip-miscconf Skip copying the dirs and files to \".configs\" except for AGS, Fish and Hyprland --deplistfile Specify a dependency list file. By default \"./scriptdata/dependencies.conf\" --fontset (Unavailable yet) Use a set of pre-defined font and config " @@ -28,7 +30,7 @@ cleancache(){ # `man getopt` to see more para=$(getopt \ -o hfk:cs \ - -l help,force,fontset:,deplistfile:,clean,skip-sysupdate,skip-ags,skip-miscconf \ + -l help,force,fontset:,deplistfile:,clean,skip-sysupdate,skip-ags,skip-fish,skip-hyprland,skip-miscconf \ -n "$0" -- "$@") [ $? != 0 ] && echo "$0: Error when getopt, please recheck parameters." && exit 1 ##################################################################################### @@ -56,6 +58,8 @@ while true ; do -f|--force) ask=false;shift;; -s|--skip-sysupdate) SKIP_SYSUPDATE=true;shift;; --skip-ags) SKIP_AGS=true;shift;; + --skip-hyprland) SKIP_HYPRLAND=true;shift;; + --skip-fish) SKIP_FISH=true;shift;; --skip-miscconf) SKIP_MISCCONF=true;shift;; ## Ones with parameter