![]() 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. 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). 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. 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. I also changed the "%.2f%%" to "%.0f" because I didn't want to show decimals, and I already added a % later in the script.GeekTool is a fabulously easy way of displaying images from the web and the output of UNIX commands on your Mac’s desktop. I had to switch the %10 and %5 because my battery percentage went from 100% to 101%, 102% when discharging Okay, I found out that I had to change the output encoding setting in GeekTool to UTF8, allowing me to show the special symbols ↯ ⚡ and also the ° for degreesĪnd even better news: your battery meter works! If you do manage to figure it out let us know! You can always forward your Hotmail messages to Gmail. Unfortunately I think you're out of luck with Hotmail - in order to get the number of unread emails you'd need to use IMAP, but Hotmail doesn't support that protocol, only POP3 which (from what I've read) doesn't provide the necessary functionality to retrieve such information. Update bash in order to make them work properly. Note that they will need to be modified, and you'll need to You have 34 new emails, 34 in Hotmail and 0 in Gmail.Īfter that has been done, I will re-upload the script so everyone can use it. It's 14 degrees outside and the weather is mostly cloudy. So this is what I would like to see on my display Done, thanks ruger42!ģ) I want the full date in English (so, not my native language), see lower Done, thanks ruger42!Ĥ) the weather, without capital letters, see lower Done, thanks ruger42!ĥ) a counter for my emails, see lower Still looking for a Hotmail counterĦ) other system info Still looking for a Battery meter I will be searching further in the meantime, but will be more than happy if some people could help me solve some individual questions.ġ) my name capitalized (I know it's easier to just put "Harm" there, but I want the script to be universal) Done, thanks ruger42!Ģ) remove the first zero and the space in 09:05 pm. I want to have additional info right on the desktop, but I need some help from you guys. Using this script for the bigger letters: So, using google, my Java and my very basic C++ knowledge, I wrote two scripts so far, here's my current output: So you can put date, cpu usage, weather and other useful info on the desktop. Yesterday I installed GeekTool, which posts the output of.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |