don't save the file if nothing was shot
This commit is contained in:
parent
ca95fec31b
commit
e6f13164a8
11
ss_rect.sh
11
ss_rect.sh
@ -5,4 +5,13 @@
|
||||
# Select an area with slurp, ss with grim
|
||||
# and copy to clipboard.
|
||||
SS="/media/fyb/share/shoka/swap/screenshots"
|
||||
grim -c -g "$( slurp )" - | wl-copy --type image/png && wl-paste > "$SS"/$( date +'%Y-%m-%d-%H%M%S.png' )
|
||||
TEMP_FILE="$HOME/temporary_screenshot"
|
||||
|
||||
grim -c -g "$( slurp )" "$TEMP_FILE"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
wl-copy --type image/png < "$TEMP_FILE"
|
||||
wl-paste > "$SS/$( date +'%Y-%m-%d-%H%M%S.png' )"
|
||||
rm "$TEMP_FILE"
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user