dotfiles

beau's configuration files
git clone https://git.beauhilton.com/dotfiles.git
Log | Files | Refs | README

maimpick (710B)


      1 #!/usr/bin/env sh
      2 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
      3 	"a selected area") maim -s pic-selected-"$(date '+%y%m%d-%H%M-%S').png" ;;
      4 	"current window") maim -i "$(xdotool getactivewindow)" pic-window-"$(date '+%y%m%d-%H%M-%S').png" ;;
      5 	"full screen") maim pic-full-"$(date '+%y%m%d-%H%M-%S').png" ;;
      6 	"a selected area (copy)") maim -s | xclip -selection clipboard -t image/png ;;
      7 	"current window (copy)") maim -i "$(xdotool getactivewindow)" | xclip -selection clipboard -t image/png ;;
      8 	"full screen (copy)") maim | xclip -selection clipboard -t image/png ;;
      9 esac