|
|
|
|
|
by chch
4805 days ago
|
|
Instead of using a very long set of If statements, I think you could just use something like 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. ;) |
|
Also, the code is now used in the liquid prompt: https://github.com/nojhan/liquidprompt/commit/91959b636af751...