| 1 | #!/bin/sh |
| 2 | |
| 3 | case "$(printf "a selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)\\na selected area\\ncurrent window\\nfull screen" | dmenu -l 6 -i -p "Screenshot which area?")" in |
| 4 | "a selected area (copy)") maim -s | xclip -selection clipboard -t image/png ;; |
| 5 | "current window (copy)") maim -i "$(xdotool getactivewindow)" | xclip -selection clipboard -t image/png ;; |
| 6 | "full screen (copy)") sleep 0.2 ; maim | xclip -selection clipboard -t image/png ;; |
| 7 | "a selected area") maim -s ~/pix/ss/pic-selected-"$(date '+%y-%m-%d-%H-%M').png" ;; |
| 8 | "current window") maim -i "$(xdotool getactivewindow)" ~/pix/ss/pic-window-"$(date '+%y-%m-%d-%H-%M').png" ;; |
| 9 | "full screen") sleep 0.2 ; maim ~/pix/ss/pic-full-"$(date '+%y-%m-%d-%H-%M').png" ;; |
| 10 | |
| 11 | esac |