summaryrefslogtreecommitdiff
path: root/mango/screenshotwayland.sh
blob: 642da01ec916d2733be09cc3db56c0942633feae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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