maimpick (969B)
1 #!/bin/sh 2 3 # This is bound to Shift+PrintScreen by default, requires maim. It lets you 4 # choose the kind of screenshot to take, including copying the image or even 5 # highlighting an area to copy. scrotcucks on suicidewatch right now. 6 7 case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)" | dmenu -l 6 -i -p "Screenshot which area?")" in 8 "a selected area") maim -s ~/screenshots/pic-selected-"$(date '+%y%m%d-%H%M-%S').png" ;; 9 "current window") maim -i "$(xdotool getactivewindow)" ~/screenshots/pic-window-"$(date '+%y%m%d-%H%M-%S').png" ;; 10 "full screen") maim ~/screenshots/pic-full-"$(date '+%y%m%d-%H%M-%S').png" ;; 11 "a selected area (copy)") maim -s | xclip -selection clipboard -t image/png ;; 12 "current window (copy)") maim -i "$(xdotool getactivewindow)" | xclip -selection clipboard -t image/png ;; 13 "full screen (copy)") maim | xclip -selection clipboard -t image/png ;; 14 esac