Showing posts with label growl. Show all posts
Showing posts with label growl. Show all posts

Sunday, May 16, 2010

Growling Mac




Last year I wrote a blog post about how to make growl notifications (little pop ups driven by the application Growl) appear from emacs in windows. Since then I've become a total Mac-head. Here's an update on how you get that working from emacs on a mac...

Everything is the same except you need to install Growl for Mac (obv) and also make sure you copy the folder called Extras somewhere.

Open up a terminal and then cd to where you put the Extras directory. Find a sub-directory called growlnotify. Enter that and run 'sudo ./install.sh' which will prompt you for your admin password, and then go ahead and install growlnotify.

You can now run growlnotify from a terminal window. Try it out, if it doesn't work you won't be able to growl from emacs.

Now follow the instructions in my blog post above but ignore all the windows parts. You'll need to customize the growl command (M-x customize group, todochiku) and replace the full path I used for windows with just 'growlnotify'.

If everything is cool you can now do M-x todochiku-in and type a message, a time in minutes (zero for now), and pop, you should have a notification.

Thursday, September 10, 2009

Making emacs growl

Roaring lion

I've always wished emacs could notify me of it's doings. For example the message function just pops up text in the minibuffer and is easy to miss, and impossible to see when the window is not in focus. So I was pleased when looking through the
twit.el code to find out about todochiku, and emacs interface to Growl.

Download Growl for windows and set it up. Send yourself a test growl at the command prompt like this:

"C:/Progra~1/Growlf~1/growlnotify.exe" /T:"title" "message"

Once that's working you can send notifications from emacs. todochiku is an emacs package for sending notifications to growl, snarl or whatever you have. In our case we have growl. Unfortunately the windows default is to use snarl, and there's no support for growl. I've made a few modifications to the original to get that working and uploaded the new file here. (Ideally I should make it so it searches both for windows and for growl or snarl being installed but for now the choice is made manually)

heyes-jones.com/todochiku.el

Download the elisp file into a directory in your emacs load-path (or add it) and add the (require 'todochiku) command to your .emacs file. Reload emacs, or just hit C-x e after the (require command in your .emacs)

You will need (require 'cl) somewhere before this is loaded (.emacs perhaps)

Customize the variables for the program using M-x customize-group todochiku

You'll need to set the `todochiku command' to something like this:

C:/Progra~1/Growlf~1/growlnotify.exe

Use "Dir /x *" in a folder to find out what the 8 character name is.

If you want icons that come with todochiku then download them from the todochiku wiki page and point to them with the variable `todochiku icons directory'. For example mine is set to:

~/localemacs/todochiku-icons

Finally you can do a growl... try this

(growl "Emacs" "Hello")



There's also `todochiku-message' which let's you specify an icon. This can be an image filename, and url, or an icon symbol from the built in list of icons you can find by the variable `todochiku-icons'.

(todochiku-message "Emacs" "You're growlingnow" 'social)

(todochiku-message "Emacs" "You're growlingnow" "http://www.growlforwindows.com/gfw/images/downloadlatest.gif")

(todochiku-message "Emacs" "You're growlingnow"
"c:/cygwin/home/Justin/localemacs/todochiku-icons/binary.png")

There's a command `todochiku-in' which will send you a notification from emacs in a set number of minutes.

(todochiku-in "hello" 3)


If you use twit.el you should find that todochiku automatically notifying you of tweets if you have called `show-recent-tweets'.

It's very simple to use todochiku and growl so you should find all kinds of applications for this. Have fun!