summaryrefslogtreecommitdiff
path: root/lisp/erc/erc-desktop-notifications.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/erc/erc-desktop-notifications.el')
-rw-r--r--lisp/erc/erc-desktop-notifications.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/erc/erc-desktop-notifications.el b/lisp/erc/erc-desktop-notifications.el
index a19e93cd3bf..f987597325b 100644
--- a/lisp/erc/erc-desktop-notifications.el
+++ b/lisp/erc/erc-desktop-notifications.el
@@ -46,6 +46,12 @@
:group 'erc-notifications
:type '(choice (const :tag "No icon" nil) file))
+(defcustom erc-notifications-bus :session
+ "D-Bus bus to use for notification."
+ :version "25.1"
+ :group 'erc-notifications
+ :type '(choice (const :tag "Session bus" :session) string))
+
(defvar dbus-debug) ; used in the macroexpansion of dbus-ignore-errors
(defun erc-notifications-notify (nick msg)
@@ -53,7 +59,8 @@
This will replace the last notification sent with this function."
(dbus-ignore-errors
(setq erc-notifications-last-notification
- (notifications-notify :title (xml-escape-string nick)
+ (notifications-notify :bus erc-notifications-bus
+ :title (xml-escape-string nick)
:body (xml-escape-string msg)
:replaces-id erc-notifications-last-notification
:app-icon erc-notifications-icon))))