forked from Shinonome/dots-hyprland
Fix firstrun logic
This commit is contained in:
@@ -159,16 +159,24 @@ case $SKIP_HYPRLAND in
|
|||||||
true) sleep 0;;
|
true) sleep 0;;
|
||||||
*)
|
*)
|
||||||
warning_rsync_delete; v rsync -av --delete "${arg_excludes[@]}" dots/.config/hypr/ "$XDG_CONFIG_HOME"/hypr/
|
warning_rsync_delete; v rsync -av --delete "${arg_excludes[@]}" dots/.config/hypr/ "$XDG_CONFIG_HOME"/hypr/
|
||||||
|
# When hypr/custom does not exist, we assume that it's the firstrun.
|
||||||
|
if [ -d "$XDG_CONFIG_HOME/hypr/custom" ];then ii_firstrun=false;else ii_firstrun=true;fi
|
||||||
t="$XDG_CONFIG_HOME/hypr/hyprland.conf"
|
t="$XDG_CONFIG_HOME/hypr/hyprland.conf"
|
||||||
if [ -f $t ];then
|
if [ -f $t ];then
|
||||||
echo -e "${STY_BLUE}[$0]: \"$t\" already exists.${STY_RST}"
|
echo -e "${STY_BLUE}[$0]: \"$t\" already exists.${STY_RST}"
|
||||||
v mv $t $t.old
|
if $ii_firstrun;then
|
||||||
v cp -f dots/.config/hypr/hyprland.conf $t
|
echo -e "${STY_BLUE}[$0]: It seems to be the firstrun.${STY_RST}"
|
||||||
existed_hypr_conf_firstrun=y
|
v mv $t $t.old
|
||||||
|
v cp -f dots/.config/hypr/hyprland.conf $t
|
||||||
|
existed_hypr_conf_firstrun=y
|
||||||
|
else
|
||||||
|
echo -e "${STY_BLUE}[$0]: It seems not a firstrun.${STY_RST}"
|
||||||
|
v cp -f dots/.config/hypr/hyprland.conf $t.new
|
||||||
|
existed_hypr_conf=y
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo -e "${STY_YELLOW}[$0]: \"$t\" does not exist yet.${STY_RST}"
|
echo -e "${STY_YELLOW}[$0]: \"$t\" does not exist yet.${STY_RST}"
|
||||||
v cp dots/.config/hypr/hyprland.conf $t
|
v cp dots/.config/hypr/hyprland.conf $t
|
||||||
existed_hypr_conf=n
|
|
||||||
fi
|
fi
|
||||||
t="$XDG_CONFIG_HOME/hypr/hypridle.conf"
|
t="$XDG_CONFIG_HOME/hypr/hypridle.conf"
|
||||||
if [ -f $t ];then
|
if [ -f $t ];then
|
||||||
|
|||||||
Reference in New Issue
Block a user