From 66b059f689f8abb9d50e83b3bfebe27f18cd57b6 Mon Sep 17 00:00:00 2001 From: Konstantin Koslowski Date: Fri, 18 Dec 2020 20:02:50 +0100 Subject: [PATCH] sway: add screenshot keybinds --- config | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/config b/config index c9ac95f..0f043d8 100644 --- a/config +++ b/config @@ -1,5 +1,5 @@ # Default config for sway -# vim: ft=i3config +# vim: ft=i3 # # Copy this to ~/.config/sway/config and edit it to your liking. # @@ -146,6 +146,15 @@ bindsym $mod+space focus mode_toggle # Move focus to the parent container bindsym $mod+a focus parent +# +## Screenshot +# needs grim, slurp and wl-clipboard packages +# +# copy selection to clipboard +bindsym Print exec grim -g "$(slurp)" - | wl-copy +# save selection +bindsym $mod+Print exec grim -g "$(slurp)" \ + $(xdg-user-dir PICTURES)/screenshot_$(date +'%Y%m%d_%H%M%S').png # # Gaps