From 13da32970b5c6509db5a794df96c0806290806c8 Mon Sep 17 00:00:00 2001 From: Aleksandr Lebedev Date: Sat, 18 Apr 2026 13:34:48 +0200 Subject: [PATCH] Screenshot-annotate.sh --- niri/.config/niri/config.kdl | 14 +++++++++++--- niri/bin/screenshot-annotate.sh | 2 ++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100755 niri/bin/screenshot-annotate.sh diff --git a/niri/.config/niri/config.kdl b/niri/.config/niri/config.kdl index 0e85fc8..48ec161 100644 --- a/niri/.config/niri/config.kdl +++ b/niri/.config/niri/config.kdl @@ -14,6 +14,7 @@ input { // For example: layout "eu,ru" + //variant "dvorak,," options "grp:lctrl_toggle, ctrl:nocaps" // If this section is empty, niri will fetch xkb settings @@ -344,6 +345,14 @@ window-rule { // This app-id regular expression will work for both: // - host Firefox (app-id is "firefox") // - Flatpak Firefox (app-id is "org.mozilla.firefox") + match app-id="com.gabm.satty" + open-floating true + open-focused true + min-width 700 + min-height 400 +} + +window-rule { match app-id=r#"librewolf$"# title="^Picture-in-Picture$" open-floating true } @@ -610,9 +619,8 @@ binds { // Mod+Space { switch-layout "next"; } // Mod+Shift+Space { switch-layout "prev"; } - Print { screenshot; } - Ctrl+Print { screenshot-screen; } - Alt+Print { screenshot-window; } + Print { spawn "screenshot-annotate.sh"; } + Mod+Shift+S { spawn "screenshot-annotate.sh"; } // Applications such as remote-desktop clients and software KVM switches may // request that niri stops processing the keyboard shortcuts defined here diff --git a/niri/bin/screenshot-annotate.sh b/niri/bin/screenshot-annotate.sh new file mode 100755 index 0000000..9b81711 --- /dev/null +++ b/niri/bin/screenshot-annotate.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +grim -g "$(slurp -w 0)" -t ppm - | satty --early-exit --copy-command 'wl-copy' --filename='-' -o '~/Pictures/Screenshots/Screenshot-%Y-%m-%d_%H:%M:%S.png' --initial-tool brush