From e58ee4bcfcbe6d34416e10af82be4ab115060625 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Tue, 30 Mar 2021 22:31:43 -0300 Subject: [PATCH] screenshotsh: work even without a defined output --- dotfiles/scripts/screenshotsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dotfiles/scripts/screenshotsh b/dotfiles/scripts/screenshotsh index 5470232..ed08f6d 100755 --- a/dotfiles/scripts/screenshotsh +++ b/dotfiles/scripts/screenshotsh @@ -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