From da8a25fc7569103cbdabd4385934be4286cd4834 Mon Sep 17 00:00:00 2001 From: Joakim Hulthe Date: Thu, 20 May 2021 17:04:03 +0200 Subject: [PATCH] Add sway screenshot hotkey --- tree/.config/sway/config | 5 +++++ tree/.local/bin/scap | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100755 tree/.local/bin/scap diff --git a/tree/.config/sway/config b/tree/.config/sway/config index d6e10fa..f4efa21 100644 --- a/tree/.config/sway/config +++ b/tree/.config/sway/config @@ -233,6 +233,11 @@ mode "resize" { } bindsym $mod+r mode "resize" +# +# ScreenCap: +# + bindsym Print exec scap + # # Status Bar: # diff --git a/tree/.local/bin/scap b/tree/.local/bin/scap new file mode 100755 index 0000000..377b369 --- /dev/null +++ b/tree/.local/bin/scap @@ -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 +