Tiny Core Linux
General TC => Programming & Scripting - Unofficial => Topic started by: Rich on August 06, 2012, 01:59:32 AM
-
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
-
Attached is an updated version of tinierclock. This version runs directly without the need for any external commands. Just
download, then:
chmod 775 tinierclock2.sh
./tinierclock2.sh
There are variables for changing the XY coordinates of the clock as well as the font.
-
If I set the width to 8 for a 24h clock, it displays just "AM" - maybe the default font is too wide?
-
Hi Juanito
A 24 hour clock doesn't have AM or PM, just 6 digits and 2 colons.
-
Hi Juanito
You also have to change this:
# 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
to this:
# 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
-
That'll teach me not to read to the end - works fine now :)
-
Hi Juanito
... - works fine now :)
Good. I though maybe I'd missed something, again.
That'll teach me not to read to the end ...
You should have just blamed me and said you couldn't find it buried amongst all the comments. ;D
-
Hi Juanito
I lifted the section of the script that launches a terminal, tracks down
its PID, and finds its /dev/ file for use in another project.
I found the section that tracks down the PID would sometimes fail. I
rewrote that section from scratch to fix the issue. The attachment in
reply #1 has been updated.