Tiny Core Linux
General TC => Programming & Scripting - Unofficial => Topic started by: PDP-8 on June 17, 2025, 05:09:55 AM
-
Just a fun thing I run in Aterm ...
I have this small rectangular clock running in the lower right about the same height at Wbar. 2-step setup.
1) In aterm, run this to see the clock every second:
watch -n1 date
resize the terminal to a small-ish rectangle so you only see one line. Then...
2) With the window resized, stop it with ctrl-c
Since I am only really interested in minute-updates, and not seconds, change the watch value to 60:
watch -n60 date
Now just slide this little rectangle clock to the right of wbar. Move it off the screen a bit if you aren't interested in the seconds and other info.
I know, kinda' dumb, but I think it's fun.
-
Hi PDP-8
Long time no see. :)
Here's one I wrote several years ago:
https://forum.tinycorelinux.net/index.php/topic,13794.msg150397.html#msg150397
-
Hi PDP-8
... Since I am only really interested in minute-updates, and not seconds, change the watch value to 60: ...
Or you could:
# Display only hours and minutes (24 hour mode).
tc@E310:~$ date +'%H:%M'
09:26
# Display only hours and minutes (12 hour mode).
tc@E310:~$ date +'%I:%M'
09:27
# Display only hours and minutes (12 hour mode) with AM/PM indicator.
tc@E310:~$ date +'%I:%M%p'
09:27AM
You can also hide the header that watch displays like this:
watch -tn1 date +'%H:%M'