diff options
| author | Tim Keller <tjk@tjkeller.xyz> | 2026-09-17 17:31:05 -0500 |
|---|---|---|
| committer | Tim Keller <tjk@tjkeller.xyz> | 2026-09-17 17:31:05 -0500 |
| commit | ff2d831980ee777ed85a0309e08d0b6fad3a6ef7 (patch) | |
| tree | af373ec79aca15d9b58b7ee3b286470beb131e3f /keyboard/screenshot | |
| parent | 3893c82e4f1f456aad4d8f6cf37ec53dfeca8285 (diff) | |
| download | scripts-ff2d831980ee777ed85a0309e08d0b6fad3a6ef7.tar.xz scripts-ff2d831980ee777ed85a0309e08d0b6fad3a6ef7.zip | |
Diffstat (limited to 'keyboard/screenshot')
| -rwxr-xr-x | keyboard/screenshot | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/keyboard/screenshot b/keyboard/screenshot index 25e99cd..2df9049 100755 --- a/keyboard/screenshot +++ b/keyboard/screenshot @@ -10,9 +10,9 @@ HELPDOC } # Scrot and xclip opts -fmt=$(date '+%m-%d-%4Y_%I:%M:%S_%p.png') -tmppath=/tmp/$fmt -savpath=~/pics/screenshots/$fmt +fmt=$(date '+%m-%d-%4Y_%I:%M:%S_%p.png') # Scrot will output ..._000.png in case of rapid screenshots +tmppath=/tmp +savpath=~/pics/screenshots normopt='' cropopt='--select --freeze' normexp='echo $f' @@ -41,6 +41,7 @@ while getopts "cxh" arg; do esac done -scrot $opt $path --exec "$exp" \ - && notify-send $notifyopts -i $path "$summ" "$body" \ +mkdir -p "$path" +scrot $opt "$path/$fmt" --exec "$exp" \ + && notify-send $notifyopts -i "$path/$fmt" "$summ" "$body" \ || notify-send $notifyopts "Screenshot Failed!" |
