diff options
Diffstat (limited to 'mango/screenshotwayland.sh')
| -rwxr-xr-x | mango/screenshotwayland.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mango/screenshotwayland.sh b/mango/screenshotwayland.sh new file mode 100755 index 0000000..642da01 --- /dev/null +++ b/mango/screenshotwayland.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +input_type=$(printf "region\nwindow" | rofi -dmenu) +case "$input_type" in + "window") + # hyprshot -m window --clipboard-only + grim -g "$(slurp)" - | wl-copy + ;; + *) + # hyprshot -m region --clipboard-only + grim -g "$(slurp)" - | wl-copy + ;; +esac + +choice=$(printf "save to clipboard\nsave to file" | rofi -dmenu) + +case "$choice" in + "save to file") + wl-paste > ~/Pictures/Screenshots/screenshot-$(date +%F_%H-%M-%S).png + ;; + *) + exit 0 + ;; +esac |
