From 76372b6a68d5a71a15ef9a1225977fe075e53a10 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Fri, 31 Jan 2014 23:14:14 +0100 Subject: Update my-smt --- .emacs.d/site-lisp/my-smt.el | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) (limited to '.emacs.d/site-lisp/my-smt.el') diff --git a/.emacs.d/site-lisp/my-smt.el b/.emacs.d/site-lisp/my-smt.el index d29fbe0..1010ddb 100644 --- a/.emacs.d/site-lisp/my-smt.el +++ b/.emacs.d/site-lisp/my-smt.el @@ -32,10 +32,10 @@ flycheck-current-errors))) `(tspan " " (tspan :fill ,(if (smt/window-active-p) "#a85454" - "#969696") ,(car counts)) + "#969696") ,(or (cdr (assoc 'error counts)) 0)) "/" (tspan :fill ,(if (smt/window-active-p) "#a88654" - "#969696") ,(cdr counts))))))) + "#969696") ,(or (cdr (assoc 'warning counts)) 0))))))) (smt/defwidget my-smt-jabber-activity :text (lambda (widget) @@ -46,10 +46,22 @@ (concat jabber-activity-mode-string " ")))) (defun my-smt-yoshi-title-style (widget) + "Fill color for either active or inactive windows. + +WIDGET is ignored." + (ignore widget) (list :fill (if (smt/window-active-p) "#a85454" "#969696"))) +(smt/defwidget my-smt-po-counters + :text (lambda (widget) + (ignore widget) + (when (eql major-mode 'po-mode) + (format " %dt+%df+%du+%do" po-translated-counter + po-fuzzy-counter po-untranslated-counter + po-obsolete-counter)))) + (smt/defwidget my-smt-buffer-identification :style 'my-smt-yoshi-title-style :text (lambda (widget) @@ -63,14 +75,26 @@ (buffer-modified-p)) "*")))) +(smt/defwidget my-smt-current-dictionary + :text (lambda (widget) + (ignore widget) + (if flyspell-mode + (concat " " (or ispell-current-dictionary + ispell-local-dictionary + flyspell-default-dictionary))))) + (smt/defrow my-smt-right :prototype 'default-right - :widgets '(my-smt-jabber-activity major-mode my-smt-flycheck-errors - version-control minor-modes)) + :widgets '(my-smt-jabber-activity + major-mode + my-smt-current-dictionary + my-smt-flycheck-errors + version-control minor-modes)) (smt/defrow my-smt-left :prototype 'default-left - :widgets '(buffer-info my-smt-buffer-identification which-function)) + :widgets '(buffer-info my-smt-buffer-identification my-smt-po-counters + which-function)) (defun my-smt-major-mode-style (widget) (ignore widget) -- cgit v1.2.3-54-g00ecf