Skip to content

Commit 551020e

Browse files
authored
feat: nixos - Screenshot Annotation via satty (ryan4yin#256)
Signed-off-by: Ryan Yin <xiaoyin_c@qq.com>
1 parent 6cfc3c3 commit 551020e

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

home/linux/gui/niri/conf/keybindings.kdl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@ binds {
232232
// Mod+Space { switch-layout "next"; }
233233
// Mod+Shift+Space { switch-layout "prev"; }
234234

235-
Print { screenshot; }
235+
// Screenshot Annotation via satty
236+
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"; }
236237
Ctrl+Print { screenshot-screen; }
237238
Alt+Print { screenshot-window; }
238239

home/linux/gui/niri/default.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ in
1818
home.packages = with pkgs; [
1919
# Niri v25.08 will create X11 sockets on disk, export $DISPLAY, and spawn `xwayland-satellite` on-demand when an X11 client connects
2020
xwayland-satellite
21+
22+
# for Screenshot Annotation
23+
slurp
24+
grim
25+
satty
2126
];
2227

2328
xdg.configFile =

0 commit comments

Comments
 (0)