Calendar (geektool code)

with ANSI Colors to show the current day.

cal | sed -E '1,$'"s/ ($(date +%e))( |$)/ $(echo '33[1;32m')\1$(echo '33[0m')\2/"


Uptime (geektool code)

I dump some of my code just in case.

uptime | awk '{sub(":", "h ", $3); sub(",", "min", $3); print "Time since last system boot: " $3}'

Terminal World Clock

I needed a multi-clock to know how to send my emails and stuff, and those desktop apps are so heavy that I script a clean one in shell.

this code is relative to the France Timezone (and must be updated when toggling between summer/winter time)

date -v-9H "+Cali : %Y/%m/%d %a — %I:%M %p"
date -v-6H "+New York : %Y/%m/%d %a — %I:%M %p"
date "+Toulouse : %Y/%m/%d %a — %I:%M %p"
date -v+5H "+BKK : %Y/%m/%d %a — %I:%M %p"
date -v+6H "+Beijing : %Y/%m/%d %a — %I:%M %p"
date -v+7H "+Tokyo : %Y/%m/%d %a — %I:%M %p"

Continue reading