summaryrefslogtreecommitdiff
path: root/.stumpwm.d/modeline.lisp
blob: 308186fed8c2fa3ef0a4dd4b9486156f0c728e83 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
;; Modeline configuration
(load "~/.stumpwm.d/colors.lisp")

(setf *default-package* :stumpwm)

(load-module "battery-portable")
;; (stumpwm:load-module "stumptray")
(load-module "mem")
(load-module "cpu")

(setf *mode-line-timeout* 2)
(setf *group-format* "%t")
(setf *window-format* "%n: %30t")

;; set modeline colors and highlight
(setf *mode-line-background-color* thanos-black-bg ;"#252B48"
      *mode-line-foreground-color* thanos-hope-fg
      *mode-line-border-color* thanos-black-bg
      *mode-line-highlight-template* "«~A»"
      mem::*mem-modeline-fmt* "%p"
      cpu:*cpu-modeline-fmt* "%c")

(setf *mode-line-border-color* thanos-black-bg
      *mode-line-border-width* 2)

(setf *time-modeline-string* "%a %d/%m/%Y | %H:%M")

(setf stumpwm:*screen-mode-line-format*
      (list "%g ^> %C "
	    '(:eval (string-trim '(#\Newline)
				 (stumpwm:run-shell-command
				  "echo $(($(cat /sys/class/thermal/thermal_zone0/temp) / 1000))C" t)))
	    "| RAM:%M| VOL:"
	    '(:eval (string-trim '(#\Newline)
				 (stumpwm:run-shell-command
				  "amixer get Master | awk '/Front Left:/ { print substr($5, 2, length($5)-2) }'" t)))
	    " | "
	    ;; Check when hermes(laptop) t display battery
	    (when (equal (asdf:hostname) "hermes")
	      "BAT:%B |")
	    "%d"))


(when stumpwm:*initializing*
  (mode-line))