mirror of
https://github.com/stumpwm/stumpwm-contrib.git
synced 2026-09-10 07:26:25 -04:00
The current README.org is confusing. When you read it, it seems like you have to add "%c" "%t" to *screen-mode-line-format*, which is incorrect. Actually, you should add "%C". Therefore, I changed the README.org a bit to make it clearer.
41 lines
1.1 KiB
Org Mode
41 lines
1.1 KiB
Org Mode
** Usage
|
|
Put:
|
|
#+BEGIN_SRC lisp
|
|
(load-module "cpu")
|
|
#+END_SRC
|
|
In your =~/.stumpwmrc=
|
|
|
|
Then you can use ~%C~ in your mode line format:
|
|
|
|
#+BEGIN_SRC lisp
|
|
(setf *screen-mode-line-format*
|
|
(list "[%n]" ; Groups
|
|
"%v" ; Windows
|
|
"^>" ; Push right
|
|
" | %C" ; CPU module
|
|
" | %d")) ; Clock
|
|
#+END_SRC
|
|
|
|
You can customize what's displayed in CPU module by changing the ~cpu::*cpu-modeline-fmt*~ variable in your =init.lisp=:
|
|
|
|
#+BEGIN_SRC lisp
|
|
(setf cpu::*cpu-modeline-fmt* "%c %t") ; default is "%c (%f) %t"
|
|
#+END_SRC
|
|
|
|
|------+---------------------|
|
|
| Code | Result |
|
|
|------+---------------------|
|
|
| %% | A literal '%' |
|
|
| %c | CPU usage |
|
|
| %C | CPU usage graph |
|
|
| %f | CPU frequency |
|
|
| %r | CPU frequency range |
|
|
| %t | CPU temperature |
|
|
|------+---------------------|
|
|
|
|
You can see the rest of the variables in the =cpu.lisp= file.
|
|
|
|
** Notes
|
|
|
|
This is specific to Linux.
|