1/29/2024 0 Comments Geektool display date![]() Until everything has moved to Unicode, iconv is a handy command to know. It lets you display various kinds of information on your desktop via 3 default plug-ins. 1 To get the degree symbol (°) displayed in GeekTool, I follow the procedure above and pipe it through iconv: ~/bin/temperature | iconv -s -f UTF-8 -t ISO_8859-1 GeekTool is a PrefPane (System Preferences module) for Mac OS 10.6. This actively developed tool attractively displays all kinds of information on your desktop (like your to-do. Line 2 allows me to include UTF-8 characters directly in the Python source code, and the encode call in Line 8 prepares them for display in the Terminal. Rainmeter (Windows) Rainmeter is a great tool for tweaking your Windows desktop. This is a much-abbreviated version of my weathertext script. GeekTool is a great application for OS X that allows you to display the contents of shell scripts, images, and files directly on the desktop. 1: #!/usr/bin/pythonĦ: # Get the current temperature for the given station.ħ: noaa = pywapi.get_weather_from_noaa('KARR')Ĩ: print u'%.0f°'.encode('utf8') % float(noaa) The text is generated by running the following Python script, which is named temperature and is stored in my ~/bin/ folder. I’ve also added a new temperature display next to the time and date down in the lower left corner of the screen: get today's day of month elephant because there's an elephant in the room. Set-up to provide any number of months at any interval. Display the weather, date and time, moon phase, system information. Provides highlighted dates at a defined weekday interval (green) and highlights current day red. I’ve done the same thing for displaying the current PandoraBoy track: osascript ~/bin/pandora-playing.scpt | iconv -s -f UTF-8 -t ISO_8859-1 Get instant access to millions of beautiful wallpapers for your Mac from the three. The part before the pipe is what I’ve always used, the iconv switches tell it to convert from ( -f) UTF-8 to ( -t) ISO 8859-1, also known as Latin-1, and to keep silent ( -s) and continue the conversion if any errors arise. A bit of trial and error led me to this GeekTool shell command: osascript ~/bin/itunes-playing.scpt | iconv -s -f UTF-8 -t ISO_8859-1 The solution to this, which I should have implemented a long time ago, is to pipe the output of the AppleScript through iconv to convert the encoding from UTF-8 to whatever it is GeekTool wants. GeekTool 3 may work fine with UTF-8, but I’m not happy with its memory use or lack of stability, so I’m still using version 2.1.2.) Hence the funky characters in the track name. The AppleScript that generates the text is emitting UTF-8, and apparently GeekTool can’t handle it. One thing that’s always bothered me about my GeekTool setup for displaying the current iTunes track is that it doesn’t handle accented characters properly. I haven’t tested it myself, but Martin says it works for him, and on matters of international character sets I tend to trust someone with an ö in his name. These are a few of the common things I found by doing some simple searching.Reader Martin Ström emailed me a link to this site, whose author has patched GeekTool 2.1.2 to display UTF-8 characters correctly. There are obviously way more things you can do with GeekTool. Prcnt=`echo "scale=2 100*$curcap/$maxcap" | bc` Next, where it says CurrentConditions:|C you're going to have to change the C to F.Ĭommand: cal=`cal` today=`date "+%e"` echo "$'` You're still going to use the same CITYDATA code but you're the end of the url where it says u=c you're going to switch it to u=f To get it to work in fahrenheit there are two things you're going to have to do. The configuration window is where you customize the shell command, font size, color etc. You can drag and move it to the position you desire. ![]() The holder is where your information will appear. A blank holder and a configuration window will appear. You need to replace CITYDATA with this code for this to work. Adding day, date and time to the desktop Open GeekTool and drag the shell icon to the desktop. Once you've found your city in the link you'll find a code for your city. First what you have to do is go to Yahoo Weather and search for your city. This code is going to change based on your location. Using a lowercase A will show the abbreviated day (Sat) Using a lowercase B will show the abbreviated month (Nov) Using a capital D will display the date in Month/Day/Year format. This is where you’ll be entering your code. There should be a properties window open with a whole bunch of fields that you can modify. Grab the shell Geeklet and drag it onto your desktop. Once you have it installed you just need to go to System Preferences>Geek Tool and you’re all set to start adding Geeklets. So how can you do this? First you need to download GeekTool. This is what my desktop looks like, and it updates in real time to show me the time, date, battery percentage left, weather, and upcoming months.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |