From 9c65e363ed8df88a51d7b3d769224682817ad548 Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Mon, 11 Nov 2013 13:26:57 +0100 Subject: [PATCH] real pomodoro --- Utils/pomodoro | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 Utils/pomodoro diff --git a/Utils/pomodoro b/Utils/pomodoro new file mode 100755 index 0000000..bbe63a6 --- /dev/null +++ b/Utils/pomodoro @@ -0,0 +1,21 @@ +#!/bin/bash + +function DISP +{ + xsetroot -name "$1" +} + +TIME=$1 + +TIME=`echo $TIME*60|bc` + + +while [ $TIME -gt 0 ]; do + min=`echo "$TIME/60" | bc` + sec=`echo "$TIME%(60)" | bc` + + DISP "Pomodoro time: $min:$sec left !" + sleep 1 + ((TIME--)) +done +