Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- SCREENSHOT_DIR="${HOME}"
- BASE_NAME=$(date +%Y-%m-%d_%H-%M-%S.%3N)
- CHOICES="1 Fullscreen|2 Select|3 Window|4 Screencast|5 Select_Temp"
- cmd=$(echo -e $CHOICES | rofi -p "Screenshot" -i -width 300 -lines 6 -dmenu -sep "|")
- case $cmd in
- "1 Fullscreen")
- maim -d 5 ${SCREENSHOT_DIR}/${BASE_NAME}.png
- notify-send --expire-time=3000 "Screenshot saved ${SCREENSHOT_DIR}/${BASE_NAME}.png"
- ;;
- "2 Select")
- maim -s --bordersize=2 ${SCREENSHOT_DIR}/${BASE_NAME}_sel.png
- notify-send --expire-time=3000 "Screenshot saved ${SCREENSHOT_DIR}/${BASE_NAME}_sel.png"
- ;;
- "3 Window")
- maim -d 5 -i $(xdotool getactivewindow) ${SCREENSHOT_DIR}/${BASE_NAME}_win.png
- notify-send --expire-time=3000 "Screenshot saved ${SCREENSHOT_DIR}/${BASE_NAME}_win.png"
- ;;
- "4 Screencast")
- ~/bin/screencast
- ;;
- "5 Select_Temp")
- maim -s --bordersize=2 --format=png /dev/stdout | xclip -selection clipboard -t image/png -i
- notify-send --expire-time=3000 "Screenshot saved in tmp"
- esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement