forked from Shinonome/caelestia-cli
install: better install + use data and state
Don't complete remove repos, use git pull instead Use XDG_DATA_HOME and XDG_STATE_HOME
This commit is contained in:
+6
-19
@@ -10,30 +10,17 @@ end
|
||||
install-deps git
|
||||
install-optional-deps 'arrpc (rich presence)'
|
||||
|
||||
set -l systemd $CONFIG/../systemd/user
|
||||
set -l client $CONFIG/../$argv[1]
|
||||
set -l discord $CONFIG/discord
|
||||
set -l client $CONFIG/$argv[1]
|
||||
set -l dist $C_DATA/discord
|
||||
|
||||
# Clone repo
|
||||
confirm-overwrite $discord
|
||||
git clone https://github.com/caelestia-dots/discord.git $discord
|
||||
# Update/Clone repo
|
||||
update-repo discord $dist
|
||||
|
||||
# Install systemd service
|
||||
if test -d $systemd
|
||||
log 'Installing systemd service...'
|
||||
|
||||
echo "[Service]
|
||||
Type=oneshot
|
||||
ExecStart=$discord/monitor/update.fish" > $systemd/discord-monitor-scheme.service
|
||||
cp $discord/monitor/discord-monitor-scheme.path $systemd/discord-monitor-scheme.path
|
||||
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user enable --now discord-monitor-scheme.path
|
||||
systemctl --user start discord-monitor-scheme.service
|
||||
end
|
||||
setup-systemd-monitor discord $dist
|
||||
|
||||
# Link themes to client config
|
||||
confirm-overwrite $client/themes
|
||||
ln -s $discord/themes $client/themes
|
||||
ln -s $dist/themes $client/themes
|
||||
|
||||
log 'Done.'
|
||||
|
||||
+3
-4
@@ -4,10 +4,9 @@
|
||||
|
||||
install-deps git foot inotify-tools
|
||||
|
||||
set -l foot $CONFIG/../foot
|
||||
set -l dist $CONFIG/foot
|
||||
|
||||
confirm-overwrite $foot
|
||||
git clone 'https://github.com/caelestia-dots/foot.git' $foot
|
||||
sed -i 's|$SRC|'$foot'|g' $foot/foot.ini
|
||||
update-repo foot $dist
|
||||
sed -i 's|$SRC|'$dist'|g' $dist/foot.ini
|
||||
|
||||
log 'Done.'
|
||||
|
||||
+3
-16
@@ -4,25 +4,12 @@
|
||||
|
||||
install-deps git fuzzel-git
|
||||
|
||||
set -l systemd $CONFIG/../systemd/user
|
||||
set -l fuzzel $CONFIG/../fuzzel
|
||||
set -l dist $CONFIG/fuzzel
|
||||
|
||||
# Clone repo
|
||||
confirm-overwrite $fuzzel
|
||||
git clone 'https://github.com/caelestia-dots/fuzzel.git' $fuzzel
|
||||
update-repo fuzzel $dist
|
||||
|
||||
# Install systemd service
|
||||
if test -d $systemd
|
||||
log 'Installing systemd service...'
|
||||
|
||||
echo "[Service]
|
||||
Type=oneshot
|
||||
ExecStart=$fuzzel/monitor/update.fish" > $systemd/fuzzel-monitor-scheme.service
|
||||
cp $fuzzel/monitor/fuzzel-monitor-scheme.path $systemd/fuzzel-monitor-scheme.path
|
||||
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user enable --now fuzzel-monitor-scheme.path
|
||||
systemctl --user start fuzzel-monitor-scheme.service
|
||||
end
|
||||
setup-systemd-monitor fuzzel $dist
|
||||
|
||||
log 'Done.'
|
||||
|
||||
+4
-16
@@ -4,24 +4,12 @@
|
||||
|
||||
install-deps git adw-gtk-theme
|
||||
|
||||
set -l gtk $CONFIG/gtk
|
||||
set -l systemd $CONFIG/../systemd/user
|
||||
set -l dist $C_DATA/gtk
|
||||
|
||||
confirm-overwrite $gtk
|
||||
git clone 'https://github.com/caelestia-dots/gtk.git' $gtk
|
||||
# Update/Clone repo
|
||||
update-repo gtk $dist
|
||||
|
||||
# Install systemd service
|
||||
if test -d $systemd
|
||||
log 'Installing systemd service...'
|
||||
|
||||
echo "[Service]
|
||||
Type=oneshot
|
||||
ExecStart=$gtk/monitor/update.fish" > $systemd/gtk-monitor-scheme.service
|
||||
cp $gtk/monitor/gtk-monitor-scheme.path $systemd/gtk-monitor-scheme.path
|
||||
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user enable --now gtk-monitor-scheme.path
|
||||
systemctl --user start gtk-monitor-scheme.service
|
||||
end
|
||||
setup-systemd-monitor gtk $dist
|
||||
|
||||
log 'Done.'
|
||||
|
||||
+16
-9
@@ -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.'
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
|
||||
install-deps git dart-sass aylurs-gtk-shell-git alsa-utils libappindicator-gtk3
|
||||
|
||||
set -l safeeyes $CONFIG/safeeyes
|
||||
|
||||
confirm-overwrite $safeeyes
|
||||
git clone 'https://github.com/caelestia-dots/safeeyes.git' $safeeyes
|
||||
# Update/Clone repo
|
||||
update-repo safeeyes $C_DATA/safeeyes
|
||||
|
||||
log 'Done.'
|
||||
|
||||
@@ -5,18 +5,17 @@
|
||||
install-deps git hyprland-git hyprpaper-git okolors-git imagemagick wl-clipboard fuzzel-git socat foot jq python
|
||||
install-optional-deps 'equibop-bin (discord client)' 'btop (system monitor)' 'wf-recorder (screen recorder)' 'grim (screenshot tool)' 'firefox (web browser)' 'spotify-adblock (music player)'
|
||||
|
||||
set -l dist $CONFIG/scripts
|
||||
set -l dist $C_DATA/scripts
|
||||
|
||||
# Clone repo
|
||||
confirm-overwrite $dist
|
||||
git clone 'https://github.com/caelestia-dots/scripts.git' $dist
|
||||
# Update/Clone repo
|
||||
update-repo scripts $dist
|
||||
|
||||
# Install to path
|
||||
mkdir -p ~/.local/bin
|
||||
ln -s $dist/main.fish ~/.local/bin/caelestia
|
||||
|
||||
# Install completions
|
||||
mkdir -p $CONFIG/../fish/completions
|
||||
cp $dist/completions/caelestia.fish $CONFIG/../fish/completions/caelestia.fish
|
||||
mkdir -p $CONFIG/fish/completions
|
||||
cp $dist/completions/caelestia.fish $CONFIG/fish/completions/caelestia.fish
|
||||
|
||||
log 'Done.'
|
||||
|
||||
+3
-3
@@ -5,10 +5,10 @@
|
||||
install-deps git dart-sass libastal-gjs-git libastal-meta npm curl libnotify ttf-material-symbols-variable-git ttf-jetbrains-mono-nerd ttf-rubik-vf pacman-contrib
|
||||
install-optional-deps 'uwsm (for systems using uwsm)' 'yay (AUR package management)' 'fd (launcher file search)' 'wl-clipboard (clipboard support)' 'foot (opening stuff in terminal)'
|
||||
|
||||
set -l shell $CONFIG/shell
|
||||
set -l shell $C_DATA/shell
|
||||
|
||||
confirm-overwrite $shell
|
||||
git clone 'https://github.com/caelestia-dots/shell.git' $shell
|
||||
# Update/Clone repo
|
||||
update-repo shell $shell
|
||||
|
||||
cd $shell || exit
|
||||
npm install
|
||||
|
||||
@@ -64,3 +64,47 @@ function install-optional-deps
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function update-repo -a module dir
|
||||
set -l remote https://github.com/caelestia-dots/$module.git
|
||||
if test -d $dir
|
||||
cd $dir || exit
|
||||
if test "$(git config --get remote.origin.url)" != $remote
|
||||
cd .. || exit
|
||||
confirm-overwrite $dir
|
||||
git clone $remote $dir
|
||||
else
|
||||
git pull
|
||||
end
|
||||
else
|
||||
git clone $remote $dir
|
||||
end
|
||||
end
|
||||
|
||||
function setup-systemd-monitor -a module dir
|
||||
set -l systemd $CONFIG/systemd/user
|
||||
if which systemctl &> /dev/null
|
||||
log 'Installing systemd service...'
|
||||
|
||||
mkdir -p $systemd
|
||||
echo "[Unit]
|
||||
Description=Sync $module and caelestia schemes
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=$dir/monitor/update.fish" > $systemd/$module-monitor-scheme.service
|
||||
echo "[Unit]
|
||||
Description=Sync $module and caelestia schemes (monitor)
|
||||
|
||||
[Path]
|
||||
PathModified=%S/caelestia/scheme/current.txt
|
||||
Unit=$module-monitor-scheme.service
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target" > $systemd/$module-monitor-scheme.path
|
||||
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user enable --now $module-monitor-scheme.path
|
||||
systemctl --user start $module-monitor-scheme.service
|
||||
end
|
||||
end
|
||||
|
||||
+4
-5
@@ -12,15 +12,14 @@ end
|
||||
|
||||
install-deps git
|
||||
|
||||
set -l dist $CONFIG/vscode
|
||||
set -l dist $C_DATA/vscode
|
||||
|
||||
# Clone repo
|
||||
confirm-overwrite $dist
|
||||
git clone 'https://github.com/caelestia-dots/vscode.git' $dist
|
||||
# Update/Clone repo
|
||||
update-repo vscode $dist
|
||||
|
||||
# Install settings
|
||||
for prog in 'Code' 'Code - OSS' 'VSCodium'
|
||||
set -l conf $CONFIG/../$prog
|
||||
set -l conf $CONFIG/$prog
|
||||
if test -d $conf
|
||||
confirm-copy $dist/settings.json $conf/User/settings.json
|
||||
confirm-copy $dist/keybindings.json $conf/User/keybindings.json
|
||||
|
||||
Reference in New Issue
Block a user