aboutsummaryrefslogtreecommitdiff
path: root/local/bin/screenshot-prompt
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2024-10-19 10:46:58 +0200
committerCharles Cabergs <me@cacharle.xyz>2024-10-19 10:46:58 +0200
commitadac84227102a191866c46f63a719e6634c6c4ae (patch)
tree2fd0683de5543f44c02a4de0f989a6c1e8000a6b /local/bin/screenshot-prompt
parent2f4f67a5067528c140e32367072f84a22fb2698e (diff)
downloaddotfiles-adac84227102a191866c46f63a719e6634c6c4ae.tar.gz
dotfiles-adac84227102a191866c46f63a719e6634c6c4ae.tar.bz2
dotfiles-adac84227102a191866c46f63a719e6634c6c4ae.zip
Save screenshots to specific directory, add video to x264 script
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