From 551020e0e890b643f63a6bee1dab404c4bf6d457 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Thu, 9 Apr 2026 10:24:43 +0800 Subject: [PATCH] feat: nixos - Screenshot Annotation via satty (#256) Signed-off-by: Ryan Yin --- home/linux/gui/niri/conf/keybindings.kdl | 3 ++- home/linux/gui/niri/default.nix | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/home/linux/gui/niri/conf/keybindings.kdl b/home/linux/gui/niri/conf/keybindings.kdl index 7a5096a2..1f04f2a4 100644 --- a/home/linux/gui/niri/conf/keybindings.kdl +++ b/home/linux/gui/niri/conf/keybindings.kdl @@ -232,7 +232,8 @@ binds { // Mod+Space { switch-layout "next"; } // Mod+Shift+Space { switch-layout "prev"; } - Print { screenshot; } + // Screenshot Annotation via satty + Print { spawn-sh "set -e; grim -t ppm -g \"$(slurp -o -d -F monospace)\" - | satty --filename - --copy-command=wl-copy --annotation-size-factor 2.0 --output-filename=\"$(xdg-user-dir PICTURES)/Screenshots/Screenshot from %Y-%m-%d %H:%M:%S.png\" --actions-on-enter=\"save-to-clipboard,exit\" --brush-smooth-history-size=5 --disable-notifications"; } Ctrl+Print { screenshot-screen; } Alt+Print { screenshot-window; } diff --git a/home/linux/gui/niri/default.nix b/home/linux/gui/niri/default.nix index 422b6050..86c1a982 100644 --- a/home/linux/gui/niri/default.nix +++ b/home/linux/gui/niri/default.nix @@ -18,6 +18,11 @@ in home.packages = with pkgs; [ # Niri v25.08 will create X11 sockets on disk, export $DISPLAY, and spawn `xwayland-satellite` on-demand when an X11 client connects xwayland-satellite + + # for Screenshot Annotation + slurp + grim + satty ]; xdg.configFile =