From 1502e9cef546c5289dbda34ec82893360d69a84e Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sat, 16 Nov 2019 14:39:46 +0100 Subject: [PATCH] [sway] add screenshot-shortcut for single window --- sway/config | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sway/config b/sway/config index 0cb6216..d22c3f6 100644 --- a/sway/config +++ b/sway/config @@ -101,8 +101,9 @@ bindsym $mod+F4 exec $keyboard-f4 bindsym $mod+Shift+F4 exec $keyboard-shift-f4 # Screenshot -bindsym Print exec "grim ~/Downloads/Screenshot-$(date +'%Y-%m-%d_%H%M%S.png')" -bindsym $mod+Print exec "slurp | grim -g - ~/Downloads/Screenshot-$(date +'%Y-%m-%d_%H%M%S.png')" +bindsym Print exec grim ~/Downloads/Screenshot-$(date +'%Y-%m-%d_%H%M%S.png') +bindsym $mod+Print exec slurp | grim -g - ~/Downloads/Screenshot-$(date +'%Y-%m-%d_%H%M%S.png') +bindsym $mod+Shift+Print exec swaymsg -t get_tree | jq -r '.. | (.nodes? // empty , .floating_nodes? // empty)[] | select(.focused) | "\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)"' | grim -g - ~/Downloads/Screenshot-$(date +'%Y-%m-%d_%H%M%S.png') # forward an backward at arrow-keys