aboutsummaryrefslogtreecommitdiff
path: root/local/bin/screenshot-prompt
diff options
context:
space:
mode:
Diffstat (limited to 'local/bin/screenshot-prompt')
-rwxr-xr-xlocal/bin/screenshot-prompt6
1 files changed, 4 insertions, 2 deletions
diff --git a/local/bin/screenshot-prompt b/local/bin/screenshot-prompt
index b449f60..f88989a 100755
--- a/local/bin/screenshot-prompt
+++ b/local/bin/screenshot-prompt
@@ -18,16 +18,18 @@ EOF
)"
screenshot_dir="$HOME/screenshots"
+[ ! -d "$screenshot_dir" ] && mkdir "$screenshot_dir"
+file_format="$screenshot_dir/"'%Y-%m-%d_$wx$h.png'
case "$choice" in
'Crop to file')
- scrot --select --silent
+ scrot --select --silent --file "$file_format"
;;
'Crop to clipboard')
scrot --select --silent - | xclip -selection clipboard -target image/png
;;
'Fullscreen to file')
- scrot --silent
+ scrot --silent --file "$file_format"
;;
'Fullscreen to clipboard')
scrot --silent - | xclip -selection clipboard -target image/png