(error -1))
)
-(defun ff/temp-and-battery-info-string () (interactive)
+(defun ff/temp-info-string () (interactive)
(condition-case nil
- (concat
-
- ;; The temperature
-
- (let ((temp (/
- (apply 'max (mapcar
- (lambda (f) (string-to-number (ff/file-first-line f)))
- ff/temperature-files))
- 1000)))
-
- (if (> temp 50)
- (let ((s (format "%dC " temp)))
- (if (> temp 70)
- (propertize s 'face 'font-lock-warning-face)
- s)
- )
- )
- )
-
- ;; The battery
-
- (pcase (ff/battery-state ff/battery-dirs)
- ;; (`charging (format "c%d%%" (ff/battery-percent)))
- ;; (`discharging (format "d%d%%" (ff/battery-percent)))
- ;; (`unknown "f")
- (`charging (format "↑%d%%" (ff/battery-percent)))
- (`discharging (format "↓%d%%" (ff/battery-percent)))
- (`unknown "✱")
- (_ "?"))
+ ;; The temperature
+
+ (let ((temp (/
+ (apply 'max (mapcar
+ (lambda (f) (string-to-number (ff/file-first-line f)))
+ ff/temperature-files))
+ 1000)))
+
+ (if (> temp 50)
+ (let ((s (format "%dC " temp)))
+ (if (> temp 70)
+ (propertize s 'face 'font-lock-warning-face)
+ s)
+ )
+ )
+ )
- )
+ (error nil))
+ )
+(defun ff/battery-info-string () (interactive)
+ (condition-case nil
+ (pcase (ff/battery-state ff/battery-dirs)
+ ;; (`charging (format "c%d%%" (ff/battery-percent)))
+ ;; (`discharging (format "d%d%%" (ff/battery-percent)))
+ ;; (`unknown "f")
+ (`charging (format "↑%d%%" (ff/battery-percent)))
+ (`discharging (format "↓%d%%" (ff/battery-percent)))
+ (`unknown "✱")
+ (_ "?"))
(error nil))
)
(setq
- display-time-interval 15 ;; Check every 15s
+ display-time-interval 10 ;; Check every 10s
display-time-string-forms `(
load " "
- (propertize
- (ff/temp-and-battery-info-string)
- 'face 'ff/battery-info-face)
+ (ff/temp-info-string)
- (propertize
- (concat " <"
- 24-hours ":" minutes
- " "
- ;; dayname " "
- monthname " " day
- ">")
- 'face 'ff/date-info-face)
+ (propertize
+ (ff/battery-info-string)
+ 'face 'ff/battery-info-face)
- )
+ " "
+
+ (propertize
+ (concat ;;" ˌ"
+ 24-hours ":" minutes
+ " "
+ ;; dayname " "
+ monthname " " day
+ ;;"ˌ"
+ )
+ 'face 'ff/date-info-face)
+
+ )
;; display-time-format "%b %a %e %H:%M"
;; display-time-mail-face nil