feat(sway): 4K scale 2, natural mouse scroll, idle inhibit for emulators

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:
Emma Thorpe
2026-09-01 10:32:24 +01:00
co-authored by Claude Opus 5
parent 730bcd1a5d
commit 46c03df06d
3 changed files with 75 additions and 2 deletions
+2 -2
View File
@@ -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.
---