dotfiles/.local/bin/pom

14 lines
382 B
Plaintext
Raw Normal View History

2020-07-04 14:23:27 +02:00
#!/bin/sh
SAVE_DIR=~/eth/pomodoros
case $1 in
add) start=$2
start_secs=$(date -d $start +'%s')
end=$3
end_secs=$(date -d $end +'%s')
duration="$(( ($end_secs - $start_secs)/60 ))"
echo "Pomodoro 1: $start to $end ($duration) $(date '+%Y%b%d')" | tee -ai $SAVE_DIR;;
*) xdotool key super+shift+9
muccadoro $1 | tee -ai "$SAVE_DIR";;
esac
pkill -RTMIN+3 dwmblocks