screenshot: fix action separator and add Pictures dir guard
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
FILE="$HOME/Pictures/screenshot-$(date +%s).png"
|
FILE="$HOME/Pictures/screenshot-$(date +%s).png"
|
||||||
|
|
||||||
|
mkdir -p "$HOME/Pictures"
|
||||||
|
|
||||||
# Exit silently if the user cancels region selection
|
# Exit silently if the user cancels region selection
|
||||||
if ! grim -g "$(slurp)" "$FILE"; then
|
if ! grim -g "$(slurp)" "$FILE"; then
|
||||||
exit 0
|
exit 0
|
||||||
@@ -13,7 +15,7 @@ action=$(notify-send "Screenshot captured" \
|
|||||||
"Saved · Copied to clipboard" \
|
"Saved · Copied to clipboard" \
|
||||||
--hint="string:image-path:$FILE" \
|
--hint="string:image-path:$FILE" \
|
||||||
--expire-time=10000 \
|
--expire-time=10000 \
|
||||||
--action="actions=Actions")
|
--action="actions:Actions")
|
||||||
|
|
||||||
[[ "$action" != "actions" ]] && exit 0
|
[[ "$action" != "actions" ]] && exit 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user