summaryrefslogtreecommitdiff
path: root/install/shell.fish
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-04-04 18:01:39 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-04-04 18:01:39 +1100
commit82d538a6ad96d6a7dc821a879e0597426758a7bf (patch)
tree7b40a086c08d372cc7a497545609fc603209f12f /install/shell.fish
parentinstall: add check for uncommitted changes (diff)
downloadcaelestia-cli-82d538a6ad96d6a7dc821a879e0597426758a7bf.tar.gz
caelestia-cli-82d538a6ad96d6a7dc821a879e0597426758a7bf.tar.bz2
caelestia-cli-82d538a6ad96d6a7dc821a879e0597426758a7bf.zip
install: use systemd services for shell and safeeyes
Diffstat (limited to 'install/shell.fish')
-rwxr-xr-xinstall/shell.fish24
1 files changed, 24 insertions, 0 deletions
diff --git a/install/shell.fish b/install/shell.fish
index 3c794c4..eca9022 100755
--- a/install/shell.fish
+++ b/install/shell.fish
@@ -13,4 +13,28 @@ update-repo shell $shell
cd $shell || exit
npm install
+if which systemctl &> /dev/null
+ log 'Installing systemd service...'
+
+ set -l systemd $CONFIG/systemd/user
+ mkdir -p $systemd
+ echo -n "
+[Unit]
+Description=A visually stunning and feature-rich desktop shell made for the Caelestia project.
+After=graphical-session.target
+
+[Service]
+Type=exec
+ExecStart=$shell/run.fish
+Restart=on-failure
+Slice=app-graphical.slice
+
+[Install]
+WantedBy=graphical-session.target
+" > $systemd/caelestia-shell.service
+
+ systemctl --user daemon-reload
+ systemctl --user enable --now caelestia-shell.service
+end
+
log 'Done.'