From 3ae82d613954f309649761e143c3572980f4b301 Mon Sep 17 00:00:00 2001 From: morten-b <32033374+morten-b@users.noreply.github.com> Date: Thu, 21 Jan 2021 19:09:55 +0100 Subject: [PATCH] Create screenshot.sh --- .config/sway/scripts/screenshot.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .config/sway/scripts/screenshot.sh diff --git a/.config/sway/scripts/screenshot.sh b/.config/sway/scripts/screenshot.sh new file mode 100644 index 0000000..16a0030 --- /dev/null +++ b/.config/sway/scripts/screenshot.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +entries="Active Screen Output Area Window" + +selected=$(printf '%s\n' $entries | wofi --width 300 --height 150 --show=dmenu --cache-file /dev/null | awk '{print tolower($1)}') + +case $selected in + active) + /usr/share/sway/scripts/grimshot --notify save active;; + screen) + /usr/share/sway/scripts/grimshot --notify save screen;; + output) + /usr/share/sway/scripts/grimshot --notify save output;; + area) + /usr/share/sway/scripts/grimshot --notify save area;; + window) + /usr/share/sway/scripts/grimshot --notify save window;; +esac