#!/bin/bash
#
# autor: twily 2024
# require: dzen2,scrot
#
#export DISPLAY=:0
c=$1
if [ -z "$c" ]; then
c=3
fi
c=$(( $c+1 )) # countdown with dzen
while [ $c -gt 1 ]; do
c=$(( $c-1 ))
echo "Taking screenshot in $c" | dzen2 -w 250 -h 50 -x 1660 -y 40 -p 1
done
ts=$( date +%s )
tdate=$( date +%Y-%m-%d-%H-%m-%S )
dir="/home/amalie/Pictures/awesome"
name="twily_$tdate.png"
sleep 1
#scrot "$dir/$name" -e 'optipng $f'
scrot "$dir/$name"
#sleep 1
echo -e "Screenshot saved to\n$name\n$dir/" | dzen2 -e 'onstart=uncollapse' -l 2 -w 250 -h 50 -x 1660 -y 40 -p 2
echo $dir/$name
Top