Steamify launcher: StartupWMClass so GNOME's dock matches the app window; session tool records the last desktop from its shell

This commit is contained in:
theupriser committed 2026-10-14 15:17:17 +02:00
1 parent 68342e7a24
commit 0e0bf57ca8
4 files changed
+24 -20

No files matched your search

+6 -1
View File
@@ -17,13 +17,18 @@ boot_status() {
[[ -f "$BOOT_UNIT" ]] && systemctl is-enabled -q "$BOOT_UNIT_NAME" 2>/dev/null
}
boot_desktop_arg() {
# Our session tool (installed with GNOME) resolves "desktop" to the preferred desktop; CachyOS's own takes a session name.
if [[ -f "$GDM_FIX_DIR/steam-set-session" ]]; then echo desktop; else echo plasma.desktop; fi
}
boot_enable() {
info "Setting the PC to boot into the desktop..."
# The sync bridge (plasma-login-manager only; not there with SDDM) copies
# the session into the base config; run it right away rather than rely
# on its path unit, which could still be pending when the login manager
# starts.
service_file "$BOOT_UNIT_NAME" SESSION_SYNC="$SESSION_SYNC" DESKTOP_SESSION="$(desktop_session_file)" | sudo tee "$BOOT_UNIT" > /dev/null
service_file "$BOOT_UNIT_NAME" SESSION_SYNC="$SESSION_SYNC" DESKTOP_SESSION="$(boot_desktop_arg)" | sudo tee "$BOOT_UNIT" > /dev/null
sudo systemctl daemon-reload
sudo systemctl enable "$BOOT_UNIT_NAME" || { err "Enabling $BOOT_UNIT_NAME failed."; return 1; }
ok "Boots into the desktop from the next boot on (Return to Gaming Mode still works)."