summaryrefslogtreecommitdiffstats
path: root/.emacs.d/site-lisp
diff options
context:
space:
mode:
authorGravatar Tom Willemse2014-01-31 23:14:14 +0100
committerGravatar Tom Willemse2014-01-31 23:14:14 +0100
commit76372b6a68d5a71a15ef9a1225977fe075e53a10 (patch)
tree3092829ba442a0006a870f9366febcda69e517e4 /.emacs.d/site-lisp
parent4034174d5602e918b1ebbad9c85ab80e7f98113c (diff)
downloademacs-76372b6a68d5a71a15ef9a1225977fe075e53a10.tar.gz
emacs-76372b6a68d5a71a15ef9a1225977fe075e53a10.zip
Update my-smt
Diffstat (limited to '.emacs.d/site-lisp')
-rw-r--r--.emacs.d/site-lisp/my-smt.el34
1 files changed, 29 insertions, 5 deletions
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)