screenshotsh: work even without a defined output
This commit is contained in:
parent
d91224e1df
commit
e58ee4bcfc
|
@ -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
|
||||
|
|
Reference in a new issue