1 ;; jabber-libnotify.el - emacs-jabber interface to libnotify
3 ;; Copyright (C) 2007 - Rodrigo Lazo - rlazo.paz@gmail.com
5 ;; This program is free software; you can redistribute it and/or modify
6 ;; it under the terms of the GNU General Public License as published by
7 ;; the Free Software Foundation; either version 2 of the License, or
8 ;; (at your option) any later version.
10 ;; This program is distributed in the hope that it will be useful,
11 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ;; GNU General Public License for more details.
15 ;; You should have received a copy of the GNU General Public License
16 ;; along with this program; if not, write to the Free Software
17 ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 (defvar jabber-libnotify-icon
""
21 "*Icon to be used on the notification pop-up. Default is empty")
24 (defvar jabber-libnotify-timeout
"2500"
25 "*Specifies the timeout of the pop up window in millisecond")
27 (defvar jabber-libnotify-message-header
"Jabber message"
28 "*Defines the header of the pop up")
31 (defun jabber-libnotify-message (msg)
32 "Show MSG using libnotify"
33 (let ((process-connection-type nil
))
34 (start-process "notification" nil
"notify-send"
35 "-t" jabber-libnotify-timeout
36 "-i" jabber-libnotify-icon
37 jabber-libnotify-message-header msg
)))
40 (define-jabber-alert libnotify
"Show a message through the libnotify interface"
41 'jabber-libnotify-message
)
43 (provide 'jabber-libnotify
)
45 ;; arch-tag: e9c4c210-8245-11dd-bddf-000a95c2fcd0