fix: start elephant as systemd service (#3405)

This commit is contained in:
Andrej Benz
2025-11-17 09:51:12 +01:00
committed by GitHub
parent e1745d7ff9
commit c17bd85c38
4 changed files with 17 additions and 7 deletions

7
autostart/walker.desktop Normal file
View File

@@ -0,0 +1,7 @@
[Desktop Entry]
Name=Walker
Comment=Walker Service
Exec=walker --gapplication-service
StartupNotify=false
Terminal=false
Type=Application

View File

@@ -12,11 +12,10 @@ if [[ $EUID -eq 0 ]]; then
# Restart services as the script owner
systemd-run --uid="$SCRIPT_OWNER" --setenv=XDG_RUNTIME_DIR="/run/user/$USER_UID" \
bash -c "
setsid uwsm-app -- elephant &
setsid uwsm-app -- walker --gapplication-service &
systemctl --user restart elephant.service
systemctl --user restart app-walker@autostart.service
"
else
setsid uwsm-app -- elephant &
wait 2
setsid uwsm-app -- walker --gapplication-service &
systemctl --user restart elephant.service
systemctl --user restart app-walker@autostart.service
fi

View File

@@ -6,8 +6,6 @@ exec-once = uwsm-app -- swaybg -i ~/.config/omarchy/current/background -m fill
exec-once = uwsm-app -- swayosd-server
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = omarchy-cmd-first-run
exec-once = uwsm-app -- elephant
exec-once = uwsm-app -- walker --gapplication-service
# Slow app launch fix -- set systemd vars
exec-once = systemctl --user import-environment $(env | cut -d'=' -f 1)

6
migrations/1762873545.sh Normal file
View File

@@ -0,0 +1,6 @@
pkill elephant
elephant service enable
systemctl --user start elephant.service
mkdir -p ~/.config/autostart/
cp $OMARCHY_PATH/autostart/walker.desktop ~/.config/autostart/