General TC > Programming & Scripting - Unofficial
Script to create a real barebones desktop clock
Rich:
The title says it all. Directions on how to launch are in the attached script. For something fancier, see:
http://forum.tinycorelinux.net/index.php/topic,13793.msg77140.html#new
Rich:
Attached is an updated version of tinierclock. This version runs directly without the need for any external commands. Just
download, then:
--- Code: ---chmod 775 tinierclock2.sh
./tinierclock2.sh
--- End code ---
There are variables for changing the XY coordinates of the clock as well as the font.
Juanito:
If I set the width to 8 for a 24h clock, it displays just "AM" - maybe the default font is too wide?
Rich:
Hi Juanito
A 24 hour clock doesn't have AM or PM, just 6 digits and 2 colons.
Rich:
Hi Juanito
You also have to change this:
--- Code: --- # For 24 hour format, comment the 12 hour line and uncomment the 24 hour line.
# echo -ne `/bin/date +'%T'` > $TTY # Display the time (24 hour format)
echo -ne `/bin/date +'%I:%M:%S%p'` > $TTY # Display the time (12 hour format)
sleep 1
done
--- End code ---
to this:
--- Code: --- # For 24 hour format, comment the 12 hour line and uncomment the 24 hour line.
echo -ne `/bin/date +'%T'` > $TTY # Display the time (24 hour format)
# echo -ne `/bin/date +'%I:%M:%S%p'` > $TTY # Display the time (12 hour format)
sleep 1
done
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version