diff options
Diffstat (limited to 'bin/screenshot')
| -rwxr-xr-x | bin/screenshot | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/bin/screenshot b/bin/screenshot index 394e02c..c2049df 100755 --- a/bin/screenshot +++ b/bin/screenshot @@ -1,10 +1,30 @@ #!/bin/sh FILENAME=$(date +%m-%d-%Y_%R:%S) mkdir -p ~/pictures/screenshots + +# using ImageMagick's import +#if [ $1 = 1 ]; then +# import clipboard: +# notify-send "Screenshot taken" "copied to clipboard" -i : +#else +# import -window root ~/pictures/screenshots/"$FILENAME".png +# notify-send "Screenshot taken" "saved to ~/pictures/screenshots/$FILENAME.png" -i : +#fi + +# using naelstrof's maim and slop if [ $1 = 1 ]; then - import clipboard: - notify-send "Screenshot taken" "copied to clipboard" -i : + #maim -i $(xdotool getactivewindow) | xclip -selection clipboard -t image/png + CHOICE=$(printf "clipboard\nfile" | dmenu -c -i -l 2) + case $CHOICE in + "clipboard") + maim -s | xclip -selection clipboard -t image/png + notify-send "Screenshot taken" "copied to clipboard" -i :;; + "file") + maim -s ~/pictures/screenshots/"$FILENAME".bmp + notify-send "Screenshot taken" "saved to ~/pictures/screenshots/$FILENAME.bmp" -i :;; + esac + else - import -window root ~/pictures/screenshots/"$FILENAME".png + maim ~/pictures/screenshots/"$FILENAME".bmp notify-send "Screenshot taken" "saved to ~/pictures/screenshots/$FILENAME.png" -i : fi |
