Emacs: Add jabber-activity widget to mode-line

This commit is contained in:
Tom Willemsen 2013-03-22 13:34:56 +01:00
parent 9da019d7e8
commit 7db1567d04

View file

@ -364,17 +364,34 @@ functionality, plus more.
(concat " " text) (concat " " text)
""))) "")))
(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 (smt/deftheme yoshi
:prototype 'black-crystal :prototype 'black-crystal
:local-widgets :local-widgets
(lambda (theme) (lambda (theme)
(let ((parent-local-widgets (let ((parent-local-widgets
(smt/t-local-widgets (smt/t-prototype theme)))) (smt/t-local-widgets (smt/t-prototype theme))))
(append (list (cons 'minor-modes (append
(list (cons 'minor-modes
(smt/make-widget (smt/make-widget
:prototye 'minor-modes :prototye 'minor-modes
:text 'oni:smt/minor-mode-indicator-text))) :text 'oni:smt/minor-mode-indicator-text)))
parent-local-widgets)))) parent-local-widgets)))
:rows '(default-left default-position oni:default-right))))
(defun oni:enable-svg-mode-line-theme () (defun oni:enable-svg-mode-line-theme ()
"Enable `svg-mode-line-theme' and select a theme." "Enable `svg-mode-line-theme' and select a theme."