Add sway screenshot hotkey

This commit is contained in:
2021-05-20 17:04:03 +02:00
parent 4ad7a90faf
commit da8a25fc75
2 changed files with 16 additions and 0 deletions

View File

@ -233,6 +233,11 @@ mode "resize" {
} }
bindsym $mod+r mode "resize" bindsym $mod+r mode "resize"
#
# ScreenCap:
#
bindsym Print exec scap
# #
# Status Bar: # Status Bar:
# #

11
tree/.local/bin/scap Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env sh
if [ "$XDG_SESSION_TYPE" != "wayland" ]; then
echo "this script only supports wayland"
exit 1
fi
DIMS="$(slurp)"
grim -g "$DIMS" - | pbc