From 0bb6a0380066e5e18fa56c1c4caef4eee2499f17 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 16 Apr 2014 00:14:06 +0200 Subject: Use stumpwm for jabber notifications --- .emacs.d/site-lisp/jabber-init.el | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to '.emacs.d/site-lisp/jabber-init.el') diff --git a/.emacs.d/site-lisp/jabber-init.el b/.emacs.d/site-lisp/jabber-init.el index 35831e5..ab760aa 100644 --- a/.emacs.d/site-lisp/jabber-init.el +++ b/.emacs.d/site-lisp/jabber-init.el @@ -26,6 +26,14 @@ Insert PROPOSED-ALERT in the buffer if it is non-nil." (ewoc-enter-last jabber-chat-ewoc (list :notice proposed-alert :time (current-time))))))) +(defun jabber-init-stumpwm-echo (from buffer text title) + "Use stumpwm to echo a message has arrived." + (oni:stumpwm-echo title)) + +(defun jabber-init-stumpwm-echo-muc (nick group buffer text title) + "Use stumpwm to echo a message has arrived." + (oni:stumpwm-echo title)) + (setq jabber-account-list (mapcar (lambda (str) (list (concat str "/" system-name))) '("tom@ryuslash.org" "ryuslash@ninthfloor.org")) @@ -63,6 +71,8 @@ Insert PROPOSED-ALERT in the buffer if it is non-nil." ;; (add-hook 'jabber-alert-message-hooks #'jabber-message-libnotify) ;; (add-hook 'jabber-alert-muc-hooks #'jabber-muc-libnotify) +(add-hook 'jabber-alert-message-hooks #'jabber-init-stumpwm-echo) +(add-hook 'jabber-alert-muc-hooks #'jabber-init-stumpwm-echo) (add-hook 'jabber-chat-mode-hook #'visual-line-mode) (add-hook 'jabber-roster-mode-hook #'jabber-init-roster-mode-func) (add-hook 'jabber-alert-presence-hooks -- cgit v1.2.3-54-g00ecf