From 382b6a6cb02088909b622e6ce1bfed873ce2b945 Mon Sep 17 00:00:00 2001 From: aloslider <53711835+aloslider@users.noreply.github.com> Date: Sun, 2 Aug 2026 04:44:18 +0300 Subject: [PATCH] Add still to freeze screenshot region --- .chezmoidata/packages.yaml | 1 + dot_local/scripts/executable_gss-screenshot.sh | 11 +++-------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.chezmoidata/packages.yaml b/.chezmoidata/packages.yaml index a1b2081..22cdcf7 100644 --- a/.chezmoidata/packages.yaml +++ b/.chezmoidata/packages.yaml @@ -44,6 +44,7 @@ packages: - nixfmt - prizrak-box-bin - python-xmlformatter + - still - tree-sitter-cli-github-bin go: - github.com/davidbudnick/redis-tui diff --git a/dot_local/scripts/executable_gss-screenshot.sh b/dot_local/scripts/executable_gss-screenshot.sh index 8040a8f..6f01b83 100644 --- a/dot_local/scripts/executable_gss-screenshot.sh +++ b/dot_local/scripts/executable_gss-screenshot.sh @@ -11,18 +11,13 @@ MODE="${1:-region}" case "${MODE}" in region) - grim -g "$(slurp -d)" -t ppm - - ;; -window) - niri msg action screenshot-window - sleep 0.5 - wl-paste --type image/png + still -p -c 'grim -g "$(slurp -d)" -t ppm -' ;; monitor-focused) - grim -t ppm -o "$(niri msg --json focused-output | jq --raw-output .name)" - + still -p -c 'grim -t ppm -o "$(niri msg --json focused-output | jq --raw-output .name)" -' ;; monitor-all) - grim -t ppm - + still -p -c 'grim -t ppm -' ;; *) echo "'${MODE}' is not a supported, aborting!" >&2