niri: fix screenshots on 2+ outputs — Mod+Shift+S captures all monitors

flameshot full dies docked: its portal path hits niri's
screenshot_all_outputs ensure!(outputs.len()==1) (upstream niri#4313,
niri 26.04), so every Print press on the home desk produces error
bubbles. niri's built-in screenshot UI selects only one output, so add
scripts/screenshot-desk.sh: per-monitor focus + screenshot-screen with
explicit --path, focus restored, one PNG per monitor in
~/Pictures/Screenshots. Bind Mod+Shift+S (Frank's call); noctalia
settings moves to Mod+Shift+O. Restore screenshot-path (was null, now
root-level as config.screenshot_path requires) for UI saves. Live-
verified docked: valid 1920x1080 PNGs for eDP-1 + DP-2, focus restored;
bats 27/27 incl. niri validate on both desk profiles.
This commit is contained in:
Frank
2026-10-14 17:21:10 -07:00
parent 9217ed83f8
commit 8da6cdc9cd
6 changed files with 144 additions and 3 deletions
@@ -15,7 +15,7 @@ binds {
// --- Noctalia ---
Mod+Shift+Return hotkey-overlay-title="Open Wallpaper Selector: noctalia wallpaper toggle" { spawn-sh "noctalia msg panel-toggle wallpaper"; }
Mod+S hotkey-overlay-title="Open Control Center: noctalia controlCenter" { spawn-sh "noctalia msg panel-toggle control-center"; }
Mod+Shift+S hotkey-overlay-title="Open Settings: noctalia settings" { spawn-sh "noctalia msg settings-toggle"; }
Mod+Shift+O hotkey-overlay-title="Open Settings: noctalia settings" { spawn-sh "noctalia msg settings-toggle"; }
Mod+D hotkey-overlay-title="Open App Launcher: noctalia launcher" { spawn-sh "noctalia msg panel-toggle launcher"; }
Mod+ALT+L hotkey-overlay-title="Lock Screen: noctalia lock" { spawn-sh "noctalia msg session lock"; }
Mod+Shift+Q hotkey-overlay-title="Session Menu: noctalia sessionMenu" { spawn-sh "noctalia msg panel-toggle session"; }
@@ -161,6 +161,11 @@ binds {
Print hotkey-overlay-title="Screenshot: flameshot full" { spawn-sh "flameshot full"; }
Ctrl+Print hotkey-overlay-title="Screenshot: flameshot region" { spawn-sh "flameshot gui"; }
Alt+Print hotkey-overlay-title="Screenshot: flameshot screen" { spawn-sh "flameshot screen"; }
// Full-desk capture: one PNG per connected monitor via
// scripts/screenshot-desk.sh (symlinked into ~/.local/bin). Works docked
// (2+ outputs), where flameshot full is dead and niri's built-in
// screenshot UI selects only one output.
Mod+Shift+S hotkey-overlay-title="Screenshot: all monitors (per-monitor files)" { spawn-sh "screenshot-desk.sh"; }
// ─── Emergency Escape Key ───
// Use this when a fullscreen app blocks your keybinds.
@@ -1,5 +1,9 @@
prefer-no-csd
screenshot-path null
// Default save path for niri-native captures (screenshot UI,
// screenshot-screen). scripts/screenshot-desk.sh (Mod+Shift+S) writes
// one file per monitor here; flameshot full is dead on 2+ outputs
// docked — see omp-docs/tools/niri/screenshots.md.
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
environment {
ELECTRON_OZONE_PLATFORM_HINT "auto"