Someone asked for this via feedback form in About page.
I didn’t find one stopwatch program, which has big text. I wrote a script to combine utimer and FIGlet (You can use TOIlet if you want), here is the script,
#!/bin/bash clear utimer -s | while read -d $'\r' line; do # If the font isn't monospace, include the following line # echo -ne "\e[2J" >&2 echo -ne "\e[H" >&2 echo "${line:21:12}" done | figlet -t -W -f aquaplan
It’s very simple. The normal stopwatch mode of utimer would have such text as follows:
Elapsed Time: 0 days 00:00:01.096 (1.096 seconds)
I extracted the time part (day part is ignored), reset cursor to top-left corner using ANSI escape code \e[H. You may have noticed that this escape code is sent to standard error instead off standard output. If you use standard out, it won’t be recognized by FIGlet, it won’t just output the escape code, but renders it literally.
If you want to find out what fonts you can use, you can run
for f in /usr/share/figlet/*; do fn=$(basename "${f%.*}") echo -e "\e[41m$fn\e[0m" figlet -t -W -f "$fn" '01:23:45.678' done
, then pick one you like.
The control is same as in utimer: Space to pause/resume, Q to quit the program. Actually, utimer still gets user input, therefore, I believe, there is as accurate as if you run utimer solely. The only issue is the screen display may be late. The time of when you hit the Space will still be accurate as long as you don’t plan to hit the key depending on the time shown on screen. Once you pause, the time shown on screen is the time you hit the key.
utimer can do more than just stopwatch, it can also work as a normal timer or as a countdown timer. Go check out its manpage. There is also a Bash script called stopwatch I found while I was seeking for a possibility, but it only has two decimal places and it doesn’t show the time unless you hit a key.
On 2011-07-26, I made urtimer, which is written in Python 2 and 3 with Urwid.
wow brutal!
ReplyDeletejust what i was looking for!
just some notes:
didnt found aquaplan font
replaced "/usr/share/figlet/*" with "/usr/share/figlet/fonts/*" in my case
but switched to toilet, it looks better
and used utimer -c $1
now i can count the time to leave, the pc, the home, to go work, to an importan event
i find motivating the fact that i can see time that is left decreasing
thx man