summaryrefslogtreecommitdiff
path: root/install/hypr.fish
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-02-22 14:25:41 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-02-22 14:25:41 +1100
commit669eaa61cbead28957c0b541212e05a8ca8c7a7f (patch)
tree064b476d7757cd8abb19faddff67defba0c538bf /install/hypr.fish
parentreadme: update help message (diff)
downloadcaelestia-cli-669eaa61cbead28957c0b541212e05a8ca8c7a7f.tar.gz
caelestia-cli-669eaa61cbead28957c0b541212e05a8ca8c7a7f.tar.bz2
caelestia-cli-669eaa61cbead28957c0b541212e05a8ca8c7a7f.zip
install: better install + use data and state
Don't complete remove repos, use git pull instead Use XDG_DATA_HOME and XDG_STATE_HOME
Diffstat (limited to 'install/hypr.fish')
-rwxr-xr-xinstall/hypr.fish25
1 files changed, 16 insertions, 9 deletions
diff --git a/install/hypr.fish b/install/hypr.fish
index e93c0ba..e7761cf 100755
--- a/install/hypr.fish
+++ b/install/hypr.fish
@@ -5,13 +5,24 @@
install-deps git uwsm hyprland-git hyprpaper-git hyprlock-git hypridle-git polkit-gnome gnome-keyring wl-clipboard wireplumber
install-optional-deps 'gammastep (night light)' 'wlogout (secondary session menu)' 'grimblast-git (screenshot freeze)' 'hyprpicker-git (colour picker)' 'foot (terminal emulator)' 'firefox (web browser)' 'vscodium-bin (IDE)' 'thunar (file manager)' 'nemo (secondary file manager)' 'fuzzel (secondary app launcher)' 'ydotool (alternate paste)' 'trash-cli (auto trash)'
-set -l hypr $CONFIG/../hypr
-set -l uwsm $CONFIG/../uwsm
+set -l hypr $CONFIG/hypr
+set -l uwsm $CONFIG/uwsm
# Cause hyprland autogenerates a config file when it is removed
-confirm-overwrite $hypr dummy
-git clone 'https://github.com/caelestia-dots/hypr.git' /tmp/caelestia-hypr
-rm -rf $hypr && mv /tmp/caelestia-hypr $hypr
+set -l remote https://github.com/caelestia-dots/hypr.git
+if test -d $hypr
+ cd $hypr || exit
+ if test "$(git config --get remote.origin.url)" != $remote
+ cd .. || exit
+ confirm-overwrite $hypr dummy
+ git clone $remote /tmp/caelestia-hypr
+ rm -rf $hypr && mv /tmp/caelestia-hypr $hypr
+ else
+ git pull
+ end
+else
+ git clone $remote $dir
+end
# Install uwsm envs
confirm-overwrite $uwsm
@@ -20,8 +31,4 @@ mv $hypr/uwsm $uwsm
# Enable ydotool if installed
pacman -Q ydotool &> /dev/null && systemctl --user enable --now ydotool.service
-# Reload hyprland config to get rid of error messages
-sleep .1
-hyprctl reload
-
log 'Done.'