omgport.blogg.se

Calendar geektool
Calendar geektool









calendar geektool
  1. #Calendar geektool how to
  2. #Calendar geektool install

Want to see how long since your last reboot, your “up time”, in an easy-to-read natural language style, like 2 days 16 hours 38 minutes? The following very long command does the trick: uptime | cut -d ' ' -f 4- | rev | cut -d ' ' -f 8- | rev | sed -e 's/,$//' -e 's/:/ hours /' -e 's/\($\)/\1 minutes/' -e 's/,/ /g' For the computer I was using at the time, at about seven swapfiles things started swapping, paging, and hanging, so I kept track of their count and rebooted before I revisited that bad place. There was a time when macOS did a bad job of cleaning up swap files.

#Calendar geektool install

This required a bit more than a stock macOS get GNU date with brew install coreutils (and if you didn’t know about the homebrew package manager, now’s the perfect time to learn).

#Calendar geektool how to

How to calculate – on one line – the number of days that have passed since a particular date? The stock macOS date can’t do it echo \( `/usr/local/bin/gdate +%s -date=today` - `/usr/local/bin/gdate +%s -date=` \) / 86400 | bc If you display multiple timezones you’ll quickly come to realize that the minutes portion of the time is the same across most timezones, so what I actually use is TZ=America/Los_Angeles date +"PST %H" TZ=America/New_York date +"EST %H" TZ=Asia/Dubai date +"Dubai %H" TZ=Asia/Kolkata date +"Kolkata %H:%M" TZ=Asia/Jakarta date +"Jakarta %H" TZ=Asia/Shanghai date +"Chengdu %H" So when you pick up your laptop and travel through a bunch of timezones (and your local time changes) the hardcoded offset doesn’t steer you wrong. TZ=":Asia/Calcutta" date +"India %a %H:%M" So I hardcoded the offset values: date -j -v+12H -v+30M +"India %a %H:%M"Ī better, proper, portable way is to specify the actual timezone in which you’re interested.

calendar geektool

Time elsewhereĬoworkers in India – how to keep track of their day and night? They’re 12.5 hours ahead of where I lived (in California). Note please there’s a significant difference between a straight quote ' and a back-quote (or back-tick) `. Specify an appropriate refresh interval, in seconds. Within GeekTool drag a “shell” object onto the desktop and paste the UNIX command line into the “command” field. GeekTool is a fabulously easy way of displaying images from the web and the output of UNIX commands on your Mac’s desktop.











Calendar geektool