From 7db1567d040140e6fc8c589e8cbc7a48f44b960c Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Fri, 22 Mar 2013 13:34:56 +0100 Subject: [PATCH] Emacs: Add jabber-activity widget to mode-line --- emacs/init.org | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/emacs/init.org b/emacs/init.org index 62656f2..235b730 100644 --- a/emacs/init.org +++ b/emacs/init.org @@ -364,17 +364,34 @@ functionality, plus more. (concat " " text) ""))) - (smt/deftheme yoshi - :prototype 'black-crystal - :local-widgets - (lambda (theme) - (let ((parent-local-widgets - (smt/t-local-widgets (smt/t-prototype theme)))) - (append (list (cons 'minor-modes - (smt/make-widget - :prototye 'minor-modes - :text 'oni:smt/minor-mode-indicator-text))) - parent-local-widgets)))) + (defun oni:jabber-activity (widget) + (when (boundp 'jabber-activity-mode-string) + (concat jabber-activity-mode-string " "))) + + (eval-after-load "svg-mode-line-themes" + '(progn + (smt/defwidget oni:jabber-activity-widget + :text 'oni:jabber-activity) + + (smt/defrow oni:default-right + :widgets '(oni:jabber-activity-widget major-mode version-control + minor-modes) + :align "right" + :margin 14) + + (smt/deftheme yoshi + :prototype 'black-crystal + :local-widgets + (lambda (theme) + (let ((parent-local-widgets + (smt/t-local-widgets (smt/t-prototype theme)))) + (append + (list (cons 'minor-modes + (smt/make-widget + :prototye 'minor-modes + :text 'oni:smt/minor-mode-indicator-text))) + parent-local-widgets))) + :rows '(default-left default-position oni:default-right)))) (defun oni:enable-svg-mode-line-theme () "Enable `svg-mode-line-theme' and select a theme."