assorted updates

This commit is contained in:
randomuser 2021-02-16 22:59:36 -06:00
parent 55f62d3467
commit 1071d2c372
3 changed files with 54 additions and 2 deletions

BIN
progs/scream Executable file

Binary file not shown.

52
scripts/timer Executable file
View File

@ -0,0 +1,52 @@
#!/bin/sh
case $0 in
*"timer"*)
[ $# -ne 2 ] && printf "specify minutes and \
seconds\n" && exit 1
sleep $(($1 * 60 + $2))
printf "your timer is done\a\n"
exit 0
;;
*"alarm"*)
[ $# -ne 1 ] && printf "specify time\n" && exit 1
ttw=$(($(date +%s --date="$1 tomorrow") - $(date +%s)))
sleep $ttw
printf "your alarm is done\a\n"
exit 0
;;
*"tomato"*)
[ $# -ne 2 ] && \
printf "specify work and rest time\n" && exit 1
counter=0
while true; do
printf "start work cycle %s\a\n" $(($counter + 1))
sleep $(($1 * 60))
printf "start rest cycle %s\a\n" $(($counter + 1))
sleep $(($2 * 60))
counter=$(($counter + 1))
done
exit 0
;;
*"stopwatch"*)
now=$(date +%s)
read var
printf "%s\n" $(($(date +%s) - $now))
exit 0
;;
*"verbosewatch"*)
min=0
sec=0
while true; do
printf "%02d:%02d\r" $min $sec
sleep 1
sec=$(($sec + 1))
[ $sec -eq 60 ] && min=$(($min + 1)) && sec=0
done
exit 0
;;
*)
printf "unknown invocation\n"
exit 2
;;
esac

View File

@ -1,7 +1,7 @@
#!/bin/sh
WALLDIR="${HOME}/.share/wallpapers"
TEEFILE="${WALLDIR}/hist"
WALLDIR="${HOME}/.local/share/wallpapers"
TEEFILE="${WALLDIR}/.hist"
BASECMD="feh --bg-fill"
generate_wall () {