repos/scripts

Simple scripts that I made for my personal computer to map keys, make bluetooth work, brightness keys, etc.
Commits Files Refs README LICENSE
commit 507e9e988340e98d96d9fbfc1b2fbe7e5227c0f1
parent ff2274e76e7b75058e938481cac67ea312dbfa61
Author: mjkloeckner <martinjkloeckner@gmail.com>
Date:   Fri, 31 Mar 2023 19:37:44 -0300

fixed takescreenshot script

takescreenshot failed because of specified pictures folder

Diffstat:
Mtakescreenshot | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/takescreenshot b/takescreenshot
@@ -2,12 +2,16 @@
 
 # Takes a screenshot of the screen and sends a notification with a preview
 
-FOLDER=~/pix/screenshots
+FOLDER=~/pictures/screenshots
 FILENAME=$FOLDER/$(date "+%H-%M-%S_%d-%m-%Y_scrot.png")
 
-[ -d $FOLDER ] && scrot -q 100 $FILENAME || $(mkdir $FOLDER && echo "Folder $FOLDER created" && scrot -q 100 $FILENAE)
+[ -d $FOLDER ] && scrot -q 100 $FILENAME \
+    || $(mkdir -p $FOLDER \
+    && echo "Folder $FOLDER created" \
+    && scrot -q 100 $FILENAE)
 
-convert -brightness-contrast 10x10 $FILENAME -resize 512x512 /tmp/takescreenshot_icon.png
+convert -brightness-contrast 10x10 $FILENAME \
+    -resize 512x512 /tmp/takescreenshot_icon.png
 
 # ACTION=$(dunstify -r 1 -t 5000 -h "string:bgcolor:#111111" "Saving screenshot to $FOLDER" -h "string:bgcolor:#111111" "Right click to open" --action=3,Open -i /tmp/takescreenshot_icon.png)