projects
/
elisp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc6529f
)
Highlight the battery level when below 20%.
author
Francois Fleuret
<francois@fleuret.org>
Wed, 23 Jan 2013 13:32:11 +0000
(14:32 +0100)
committer
Francois Fleuret
<francois@fleuret.org>
Wed, 23 Jan 2013 13:32:11 +0000
(14:32 +0100)
emacs.el
patch
|
blob
|
history
diff --git
a/emacs.el
b/emacs.el
index
f871271
..
525a118
100644
(file)
--- a/
emacs.el
+++ b/
emacs.el
@@
-830,8
+830,10
@@
printer."
(ff/battery-percent "energy"))))
((string= battery-status "Discharging")
- (format "B%d%%" (max (ff/battery-percent "charge")
- (ff/battery-percent "energy"))))
+ (let* ((c (max (ff/battery-percent "charge")
+ (ff/battery-percent "energy")))
+ (s (format "B%d%%" c)))
+ (if (>= c 20) s (propertize s 'face 'font-lock-warning-face))))
(t battery-status)