Single-script builder (nosignal.sh) that turns a stock Arch Linux ISO into a fully-offline installer for a themed Hyprland + caelestia (Quickshell) desktop: matching SDDM greeter, Btrfs/Limine bootable snapshots, chwd-style GPU detection, and a curated "os updates" layer (keybind cheatsheet, settings panels, system polish, on-box management skill). See README.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3.8 KiB
3.8 KiB
gamemode-toggle-deckshift — Game Mode toggle launches DeckShift
Companion to gaming-key-guard (which does the Super+Shift+S keybind). Patches
the package-owned nosignal-shell file; the canonical fix is in the fork.
Request
The utilities Game Mode button (gamepad icon) should launch the DeckShift gaming session when DeckShift is installed, and do nothing otherwise. Previously it ran caelestia's cosmetic Game Mode (disable Hyprland animations/blur/gaps).
Change
modules/utilities/cards/Toggles.qml, the gameMode DelegateChoice:
before
delegate: Toggle {
icon: "gamepad"
checked: GameMode.enabled
onClicked: GameMode.enabled = !GameMode.enabled
}
after (hardened)
delegate: Toggle {
id: gmTog
property bool launching: false
icon: "gamepad"
disabled: launching
onClicked: {
if (gmTog.launching) return;
gmTog.launching = true;
gmTog.internalChecked = false; // don't latch "on" — it's a launcher
relockTimer.start();
Quickshell.execDetached(["sh", "-c", "[ -x /usr/local/bin/switch-to-gaming ] && [ -f /usr/share/wayland-sessions/gamescope-session-steam-nm.desktop ] && exec /usr/local/bin/switch-to-gaming"]);
}
Timer { id: relockTimer; interval: 5000; onTriggered: gmTog.launching = false }
}
- Kept styled as an off-toggle (default
isToggle: true, nochecked) so it keeps the muted/outline look of the other toggles. An earlier version setisToggle: false, which flipped the icon to filled/accent — that was the reported "changed colour"; reverted.internalCheckedis reset to false on click so the launcher never latches "on". - Debounced. A fast double-click previously fired
switch-to-gamingtwice → twosystemctl restart sddmcalls → the first restart consumed the one-shot autologin marker and the second fell back to the password greeter (the reported "takes you to the login screen, not gamescope"). Thelaunchingguard +disabled+ 5 srelockTimerensure one launch per press. - The
sh -c '… && … && exec switch-to-gaming'guard mirrors the Super+Shift+S bind and the deckshift-login install-check: nothing happens if DeckShift is absent. - Adds
import Quickshell(forexecDetached; the file only hadQuickshell.Bluetooth).GameMode(fromqs.services) is no longer referenced here — the cosmetic Game Mode is still available via its IPC (gameModetarget) if a future build wants to re-expose it elsewhere. - Hidden when DeckShift isn't installed. A
deckshiftProbeProcess (test -f /usr/share/wayland-sessions/gamescope-session-steam-nm.desktop) setsroot.deckshiftInstalledat load, and thequickTogglesfilter drops thegameModeentry when it's false (same pattern as the existingvpnspecial-case) — so the tile cleanly leaves the grid (no dead button, no gap) on non-gaming boxes, and appears once DeckShift is installed (after a shell reload). Needsimport Quickshell.IoforProcess.
Pieces / integration
Toggles.qml— corrected file (drop-in formodules/utilities/cards/Toggles.qmlin the nosignal-shell fork). Rebuild the package; setNOSIGNAL_SKIP_SHELL_PATCHfor the build.install-gamemode-toggle-deckshift.sh— idempotent fallback patch (backup + overwrite). Reverted by the next nosignal-shell upgrade (which carries the fix).1781478000-gamemode-toggle-deckshift.sh→nosignal-update/migrations/(delegates via$NOSIGNAL_SRC).
Shell restart required: qs -c caelestia -n -d disables the file watcher, so
the patched file is not hot-reloaded — restart the shell (Ctrl+Super+Alt+R) or
log out/in after patching.
Apply on this box now (needs root)
sudo sh ~/nosignal-handoff/gamemode-toggle-deckshift/install-gamemode-toggle-deckshift.sh
then Ctrl+Super+Alt+R.