summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2013-03-22 13:34:56 +0100
committerGravatar Tom Willemsen2013-03-22 13:34:56 +0100
commit7db1567d040140e6fc8c589e8cbc7a48f44b960c (patch)
treefe14b788bce998728902757dba0eeb22dd6853d0
parent9da019d7e8394076c9c5e19b2842fb7fd1123c6b (diff)
downloaddotfiles-7db1567d040140e6fc8c589e8cbc7a48f44b960c.tar.gz
dotfiles-7db1567d040140e6fc8c589e8cbc7a48f44b960c.zip
Emacs: Add jabber-activity widget to mode-line
-rw-r--r--emacs/init.org39
1 files 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."