maim-config (869B)
#!/bin/bash #A small script file for main to pick settings for screenshot taking. Requires maim. OUT="$(date '+%y%m%d-%H%M-%S').png" XCLIP_CMD="xclip -sel clip -t image/png" OPT=$(echo -e "0: A selected area\n1: Current Window\n2: Full screen\n3: A selected area (copy)\n4: Current window (copy)\n5: Full screen (copy)" | dmenu -l 6 -i -p "Select which area to screenshot..." | awk 'BEGIN{FS=":"}{print $1}') if [[ "$OPT" = "0" ]]; then maim -u -s pic-selected-"${OUT}" elif [[ "$OPT" = "1" ]]; then maim -q -d 0.2 -i "$(xdotool getactivewindow)" pic-window-"${OUT}" elif [[ "$OPT" = "2" ]]; then maim -q -d 0.2 pic-full-"${OUT}" elif [[ "$OPT" = "3" ]]; then maim -u -s | ${XCLIP_CMD} elif [[ "$OPT" = "4" ]]; then maim -q -d 0.2 -i "$(xdotool getactivewindow)" | ${XCLIP_CMD} elif [[ "$OPT" = "5" ]]; then maim -q -d 0.2 | ${XCLIP_CMD} fi