sway: only open current monitor for satty screenshot editor

This commit is contained in:
Leonardo Eugênio 2025-09-04 00:28:29 -03:00
parent e72e9a2688
commit 2f7572839f
2 changed files with 10 additions and 3 deletions

View file

@ -46,4 +46,13 @@ case $1 in
$screenshot -o "$cur_output" - | $copy ||
$screenshot - | $copy
;;
edit)
# Focused monitor to clipboard
cur_output=$(swaymsg -t get_outputs |
jq -r '.[] | select(.focused) | .name')
test -n "$cur_output" &&
$screenshot -o "$cur_output" - | satty --filename - --output-filename "$DESTFILE" ||
$screenshot - | satty --filename - --output-filename "$DESTFILE"
;;
esac