screenshotsh: work even without a defined output

This commit is contained in:
lelgenio 2021-03-30 22:31:43 -03:00
parent d91224e1df
commit e58ee4bcfc

View file

@ -36,7 +36,8 @@ case $1 in
cur_output=$(swaymsg -t get_outputs |
jq -r '.[] | select(.focused) | .name')
grim -o "$cur_output" - | wl-copy ||
test -n "$cur_output" &&
grim -o "$cur_output" - | wl-copy ||
grim - | wl-copy
;;
esac