updated screenshot script, now using maim instead of scrot

This commit is contained in:
elena 2018-05-16 21:10:00 +03:00
parent 898825bc8b
commit ee8634e03c
2 changed files with 27 additions and 9 deletions

27
Scripts/screenshot.sh Executable file
View file

@ -0,0 +1,27 @@
#!/bin/bash
# Screenshot wrapper
# Uses maim (which uses slop)
# "Friendship ended with scrot. Now maim is my best friend."
SCREENSHOTS_DIR=~/Pictures/Screenshots
TIMESTAMP="$(date +%Y.%m.%d-%H.%M.%S)"
FILENAME=$SCREENSHOTS_DIR/$TIMESTAMP.screenshot.png
PHOTO_ICON_PATH=~/.icons/oomox-only_icons/categories/scalable/applications-photography.svg
# -u option hides cursor
if [[ "$1" = "-s" ]]; then
# Area/window selection.
notify-send 'Select area or window to capture.' --urgency low -i $PHOTO_ICON_PATH
maim -u -s $FILENAME
notify-send "Screenshot taken." --urgency low -i $PHOTO_ICON_PATH
elif [[ "$1" = "-c" ]]; then
# Copy selection to clipboard
maim -u -s | xclip -selection clipboard -t image/png
notify-send "Copied selection to clipboard." --urgency low -i $PHOTO_ICON_PATH
else
# Full screenshot
maim -u $FILENAME
notify-send "Screenshot taken." --urgency low -i $PHOTO_ICON_PATH
fi

View file

@ -1,9 +0,0 @@
#!/bin/bash
if [[ "$1" = "-s" ]]; then
notify-send 'Select area to capture.' --icon=/home/elena/.icons/oomox-wally-flat/apps/scalable/gnome-screenshot.svg --urgency low
scrot -s '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/Pictures/Screenshots/';
notify-send "Screenshot taken." --icon=/home/elena/.icons/oomox-wally-flat/apps/scalable/gnome-screenshot.svg --urgency low
else
scrot '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/Pictures/Screenshots/';
notify-send "Screenshot taken." --icon=/home/elena/.icons/oomox-wally-flat/apps/scalable/gnome-screenshot.svg --urgency low
fi