diff options
| -rwxr-xr-x | local/bin/screenshot-prompt | 6 | ||||
| -rwxr-xr-x | local/bin/video-to-x264 | 6 |
2 files changed, 10 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 diff --git a/local/bin/video-to-x264 b/local/bin/video-to-x264 new file mode 100755 index 0000000..ed15b56 --- /dev/null +++ b/local/bin/video-to-x264 @@ -0,0 +1,6 @@ +#!/bin/sh + +ffmpeg -hwaccel cuda \ + -i "$1.mp4" \ + -map 0 -c:v libx264 -crf 18 -vf format=yuv420p -c:a copy \ + "$1-x264.mp4" |
