stumpwm/stumpwm-contrib

CPU - modeline/cpu display '%c' instead of it's value

28446 opened this issue · 2 comments

28446 commented

stumpwm 1.0.1

Hi,
calling '%c' in mode-line display literal '%c', calling '%C' display correctly '%c' value besides other info ( but not temp).

I just want to read the CPU usage as % in mode-line, how can I do?

Thanks

Same problem here: my modeline shows %c%t.

After figuring out that the (cpu::fmt-cpu-XXX)-functions all worked, I just set the format I wanted in my stumpwm init file as a workaround: (setf cpu::*cpu-modeline-fmt* "%c %t").

28446 commented

Hi @chuchana ,
It works, Thank you!

(setf cpu::cpu-modeline-fmt "%c")

(setf stumpwm:screen-mode-line-format
(list
'(:eval (stumpwm:run-shell-command
"echo -n setxkbmap -query | grep 'layout' | cut -d ' ' -f6" t))
"|%d|%g|%M|%C|%l>%W"))