![]() ![]() The final step is to fire up GeekTool and create a new shell item that runs the ~/bin/gt-irssi script every five minutes. The -n option is used to give it a unique name so that in the Growl Preferences I can change how the notifications look and where they are placed. I use the -a option to have the Growl notification show the Linkinus IRC application’s icon, and use -s to make it sticky so that it will remain on the desktop until I click it away. It reads in the output of diff, so that any new additions to the file get sent to growlnotify, a command-line tool that interfaces with Growl: here it sets the message to the actual text from IRC, and sets the title of the notification to “nick time”, so I can see when the notify came, and by whom. It also prints out the last 10 lines of the file (using tail) this is what will get printed to the desktop via GeekTool. ![]() This is done so that I can use diff to tell me if there are any new highlights. What this script does is copy the fnotify file to ~/.fnotify after renaming the existing ~/.fnotify file to ~/.fnotify.old. This is my ~/bin/gt-irssi script: #!/bin/sh mv -f ~/.fnotify ~/.fnotify.old cp -f ~/Documents/Shared/fnotify ~/.fnotify tail ~/.fnotify # growl notification the rest is displayed on the screen diff -uN ~/.fnotify.old ~/.fnotify | grep '^ ' | grep -v '^ ' | cut -d ' ' -f 2- | \ while read dow month day time year nick message do \ /usr/local/bin/growlnotify -s -a Linkinus.app -m "$" -n irssi \ done Now, whenever fnotify writes a highlight, it writes it to a file accessible on the Mac, which we can then use a script to manipulate. Because I have the host and virtual machine share a directory via Fusion’s shared folders, I created a symlink to a file on the shared drive so it was accessible on the Mac: $ touch /mnt/hgfs/Shared/fnotify $ ln -s /mnt/hgfs/Shared/fnotify ~/.irssi/fnotify However, this was a less than ideal solution.įinding a script called for irssi, I was able to make irssi write highlights to a file (~/.irssi/fnotify). The only real way to keep an eye on IRC was to have a separate Terminal just for that ssh session and keep it visible, so that I would notice if anyone tried to get my attention. Unfortunately, by having the ssh session to the virtual machine as one of many tabs in Terminal, it is easy to miss any highlights in irssi, so someone could be trying to get my attention and I may not realize it for quite a while. The benefits to this are that Firefox gets the kerberos credentials and routing to the VPN from within the virtual machine, and I get Firefox as an application on the Mac desktop. The only GUI application used is Firefox, which I can get on the Mac desktop by starting X11.app and using ssh -X to the virtual machine, and starting Firefox from the command-line. With this, I can ssh into the virtual machine from the host, where mutt and irssi run. ![]() In the interest of saving power, the Fedora system turned into a virtual machine on the Mac. The VPN is not accessible outside of the virtual machine (the primary reason being that I used to run two physical systems: one running Fedora, the other OS X, because each belonged to a different kerberos realm). I’m going to describe a unique method of using the two together to accomplish something I’ve needed myself, in the hopes that it might get the creative juices flowing for how GeekTool and Growl can work together for you.įor security reasons, I have a VMware Fusion virtual machine running Fedora, which connects to a VPN. I’m also a big fan of GeekTool, which allows you to display various bits of information on your desktop, like uptime information or the weather, or anything else you like that can be run from a script or contained in a text file.Ĭombining the two is even more interesting, and there are tons of possibilities here. For instance, Growl can alert you when new files are downloaded from Dropbox, when a track changes in iTunes, and so forth. I am a huge fan of the free Growl application, which allows other applications to tell you what’s happening with them. Find out what you can do with Growl and GeekTool on a Mac. Finding one app that does exactly what you want is one thing, but combining two apps to do something really specific to your needs is really cool. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |