Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
28446 opened this issue Nov 7, 2020 · 2 comments
Open

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

28446 opened this issue Nov 7, 2020 · 2 comments

Comments

@28446
Copy link

28446 commented Nov 7, 2020

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

@chuchana
Copy link

chuchana commented Apr 5, 2021

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
Copy link
Author

28446 commented Jul 28, 2021

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"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants