1 ;; Author: Sridhar Ratna
2 ;; URL: http://freeshell.in/~srid/dotfiles/emacs/dot-emacs
5 ;(load "rcirc-nick-colors.el")
8 (defun flash-emacs (prefix)
9 (setq frame-title-format
10 (format "%s%%b - Emacs" prefix
))
11 (setq icon-title-format
14 (defun wmii-notify (msg)
15 ;; this requires the wmii-ruby plugin `wmii-notifier.rb`
16 ;; http://nearfar.org/code/dotfiles/dot-wmii-3/plugins/wmii-notifier.rb
17 (start-process "bash" nil
"bash" "-c"
18 (format "echo -n \"%s\" > ~/.wmii-notifier" msg
)))
20 (add-hook 'rcirc-print-hooks
'my-rcirc-print-hook
)
21 (setq alert
"/usr/share/sounds/gaim/alert.wav")
22 (defun my-rcirc-print-hook (process sender response target text
)
23 (when (and (string-match (rcirc-nick process
) text
)
24 (not (string= (rcirc-nick process
) sender
))
25 (not (string= (rcirc-server-name process
) sender
)))
26 ;; different ways to notify the user
27 ;; beep, libnotify, emacs-title,.. and wmii!
28 (start-process "beep" nil
"aplay" (expand-file-name alert
))
29 (start-process "notify" nil
"~/bin/notify.py"
30 (format "'channel: %s'" target
)
31 (format "'%s messaged ya'" sender
))
32 ; (flash-emacs (format "** %s ** " sender))
33 (wmii-notify (format "%s: %s messaged ya" target sender
)))
34 (when (string= (rcirc-nick process
) sender
)
38 (load "~/.freenode.el")
41 (list "freenode" 'nickserv
"srid" passwd
)
42 (list "oftc" 'nickserv
"srid" passwd
)
43 (list "bitlbee" 'bitlbee
"srid" passwd
)))
47 (rcirc-connect "testing.bitlbee.org" 6667
48 "srid" "srid" "Sridhar Ratnakumar"))
52 (rcirc-connect "irc.oftc.net" 6667
53 "srid" "srid" "Sridhar Ratnakumar"))