diff options
author | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2019-06-13 19:19:50 +0200 |
---|---|---|
committer | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2019-06-13 19:19:50 +0200 |
commit | d3b421b57458289c8e12201439c363db4884e252 (patch) | |
tree | 38645d631ef4fc99d02ccf0067ce0f4285ca14ec | |
parent | Added logout option to the exit script (diff) | |
download | dmenu-d3b421b57458289c8e12201439c363db4884e252.tar.gz dmenu-d3b421b57458289c8e12201439c363db4884e252.tar.bz2 dmenu-d3b421b57458289c8e12201439c363db4884e252.zip |
Fixed screenshot script notifications
-rwxr-xr-x | scripts/screenshot | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/screenshot b/scripts/screenshot index 37c2460..97ea82e 100755 --- a/scripts/screenshot +++ b/scripts/screenshot @@ -29,8 +29,8 @@ IMG_PATH=$HOME/Images FILEMASK=%Y-%m-%d-@%H-%M-%S-screenshot.png RES=1920x1080 #set your screen resolution -TIME=3 #How long will notifications be visible? -COUNTER=3 #Seconds to count for delay +TIME=3000 #How long will notifications be visible (ms)? +COUNTER=3000 #Ms to count for delay ################## Configuration End ############################## @@ -48,14 +48,13 @@ prog=" cmd=$(dmenu -l 10 -p 'Choose Screenshot Type' <<< "$prog") (( rounded_num= ($COUNTER + (2 - 1) / 2))) #round the number -((final_rounded_num = $rounded_num * 1000 )) #convert to seconds cd $IMG_PATH case ${cmd%% *} in #for local screenshots 1.Normal_fullscreen) scrot -d 1 "$FILEMASK" && notify-send -u low -t ${TIME} "Screenshot saved" ;; - 2.Delayed_fullscreen) notify-send -u low -t $final_rounded_num "Screenshot in $COUNTER seconds" && sleep $COUNTER && scrot -d 1 "$FILEMASK" && notify-send -u low -t ${TIME} "Screenshot saved" ;; + 2.Delayed_fullscreen) notify-send -u low -t $rounded_num "Screenshot in $COUNTER seconds" && sleep $COUNTER && scrot -d 1 "$FILEMASK" && notify-send -u low -t ${TIME} "Screenshot saved" ;; 3.Section) scrot -s "$FILEMASK" && notify-send -u low -t ${TIME} "Screenshot saved" ;; #for screencasts |