From 28a9d1b39a29053f032cd9dc02f5eaf1c217c213 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Sat, 29 Aug 2026 11:53:19 +0200 Subject: [PATCH] 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 Claude-Session: https://claude.ai/code/session_01LHvz6Nxkf9SU2EufjWZ3cG --- triggershell.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/triggershell.yml b/triggershell.yml index 5ed806a..11e38a0 100644 --- a/triggershell.yml +++ b/triggershell.yml @@ -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: >-