feat(sway): 4K scale 2, natural mouse scroll, idle inhibit for emulators
CI / flake (push) Skipped
CI / flake (push) Skipped
Three unrelated desktop-side fixes, all in home/sway.nix. Sway cannot key an output rule on resolution, so scale 2 on 4K displays is applied by a user service that runs once at session start and again on every output event, which is what makes it survive a display being switched off and on. The scale guard in the jq filter stops the subscription feeding itself. kanshi still owns mode and position; no profile here sets a scale, so the two do not fight. natural_scroll on type:pointer gives mice the same scroll direction as the touchpads already had. PCSX2 and Dolphin default to borderless-windowed rather than compositor fullscreen, so the existing inhibit_idle fullscreen rules never matched and swaylock engaged mid-game. Inhibit on focus for the emulators instead. The Steam session is unaffected either way: swayidle is wanted by graphical-session.target and conditional on WAYLAND_DISPLAY, and the gamescope session provides neither. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
0e10083ea4
commit
61a57f41e6
@@ -124,6 +124,25 @@ The greeter is **Dvorak**, like every other host here (`modules/sway.nix` forces
|
||||
`XKB_DEFAULT_VARIANT=dvorak` on cage). Only relevant if someone else has to type
|
||||
a password.
|
||||
|
||||
### The Sway session behind it
|
||||
|
||||
Two fleet-wide rules in `home/sway.nix` matter more on a television than
|
||||
anywhere else:
|
||||
|
||||
- Any output running at 4K is forced to **scale 2** (1920x1080 logical). Sway's
|
||||
config cannot key an output rule on resolution, so a small user service
|
||||
applies it at session start and again on every output event — which is what
|
||||
makes it survive the TV being switched off and on.
|
||||
- The emulators inhibit idle **while focused**, not only while fullscreen.
|
||||
PCSX2 and Dolphin default to borderless-windowed rather than compositor
|
||||
fullscreen, so the generic `inhibit_idle fullscreen` rules never fired and
|
||||
swaylock cut in mid-game.
|
||||
|
||||
Neither applies in the Steam session: `swayidle` is a home-manager user service
|
||||
wanted by `graphical-session.target` and conditional on `WAYLAND_DISPLAY`, and
|
||||
the gamescope session starts neither, so nothing locks the screen in Big
|
||||
Picture.
|
||||
|
||||
### Adding non-Steam titles to Big Picture
|
||||
|
||||
RetroArch, PCSX2, Dolphin and Clone Hero are installed system-wide but are not
|
||||
|
||||
+2
-2
@@ -18,8 +18,8 @@ rebuild, never the generated dotfiles.
|
||||
- Letter keys are **keysyms** (the character produced), not physical positions.
|
||||
The keyboard is **Dvorak** (`us`/`dvorak`), so e.g. "Super+s" is whatever key
|
||||
types `s` in Dvorak.
|
||||
- Shortcuts apply to every Sway host (MBP, T400, Mac Pro); brightness keys are
|
||||
laptop-only, as noted.
|
||||
- Shortcuts apply to every Sway host (MBP, T400, Mac Pro, Console); brightness
|
||||
keys are laptop-only, as noted.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user