feat(triggershell): add Spotify app start command

Launches Spotify via systemd-run --user so it inherits the graphical
session environment (the triggershell service starts before the Wayland
session and lacks WAYLAND_DISPLAY/DISPLAY). Idempotent: no-op when
spotify.service is already active.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LHvz6Nxkf9SU2EufjWZ3cG
This commit is contained in:
2026-08-29 11:53:19 +02:00
co-authored by Claude Sonnet 5
parent a0205f9958
commit 28a9d1b39a
+24
View File
@@ -354,6 +354,30 @@ scripts:
passAs: arg
argName: --zone
- id: spotify-start
name: "Spotify: Start App"
description: >-
Launch the Spotify desktop app on the local session. Does nothing if it is
already running (Spotify focuses its existing window).
command: bash
args:
- -c
- |
# triggershell.service starts before the graphical session, so its own
# environment has no WAYLAND_DISPLAY/DISPLAY and a stripped-down PATH.
# systemd-run --user launches Spotify from the user manager instead,
# which does carry the full graphical environment.
if systemctl --user --quiet is-active spotify.service; then
echo "Spotify is already running."
exit 0
fi
systemctl --user reset-failed spotify.service 2>/dev/null || true
exec systemd-run --user --collect --quiet --unit=spotify spotify-launcher
- spotify-start
cwd: ./
timeoutSeconds: 20
variables: []
- id: system-shutdown
name: "System: Shutdown"
description: >-