An analog clock in your bash prompt on OS X
1–10 of 21 posts
Re: An analog clock in your bash prompt on OS X
#2Re: An analog clock in your bash prompt on OS X
#3Re: An analog clock in your bash prompt on OS X
#4Re: An analog clock in your bash prompt on OS X
#5Is there a particular font that works better than others for this? I've tried all my fixed width fonts and the clock is barely readable in any of them.
Re: An analog clock in your bash prompt on OS X
#6Re: An analog clock in your bash prompt on OS X
#7This is cutesy, but having a timestamp on your prompt is an easy-to-implement sometimes-lifesaver. Highly recommended, one way or another :)
Speaking of another:
export PS1="\t $"
For a lot more information on bash prompts, I'd recommend http://blog.sanctum.geek.nz/bash-prompts/Re: An analog clock in your bash prompt on OS X
#8This is cutesy, but having a timestamp on your prompt is an easy-to-implement sometimes-lifesaver. Highly recommended, one way or another :)
Re: An analog clock in your bash prompt on OS X
#9This solution may be a little terse (96 bytes; I wrote it for the 140bytes golfing challenge), but it should help explain how to get the current time's clock character: https://gist.github.com/eligrey/985721#file-annotated-js
Re: An analog clock in your bash prompt on OS X
#10 a=$((`date +%M`/15));b=$((128335 + `date +%l` +((a*(a**2-39*a+110))/6)));printf '%x' $b;
and print the resulting hex's character, no?(I'd finish off the code myself, but I have a bus to catch)
Edit: Ah, I see Sephr came prepared. ;)