From ee54ebae352318af5f03b9046acb3bfe9845bb9d Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Thu, 14 Oct 2021 09:25:35 +0200 Subject: [PATCH] [StumpWM] Add WiFi to modeline, change format of modules --- org/config/stumpwm.org | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/org/config/stumpwm.org b/org/config/stumpwm.org index 7c942fd..d80da93 100644 --- a/org/config/stumpwm.org +++ b/org/config/stumpwm.org @@ -380,6 +380,7 @@ Here are some modules that we will load for the modeline: | battery-portable | Get information on the battery level of a laptop | | cpu | Get the CPU usage of the computer | | mem | Get the memory usage of the computer | +| wifi | Display information about Wifi connectivity | #+name: gen-load-modeline-modules #+headers: :wrap src lisp @@ -395,6 +396,7 @@ Here are some modules that we will load for the modeline: (load-module "battery-portable") (load-module "cpu") (load-module "mem") +(load-module "wifi") #+end_src We can indicate what to display in our modeline. Be aware the ~^>~ @@ -405,7 +407,10 @@ highlighted, and ~%u~ will display urgent windows if there are any. ~%d~ on the other hand will display the date in the format set above, while ~%B~ will display the battery level of the laptop. #+begin_src lisp -(setf *screen-mode-line-format* (list "%g %v %u ^> %C | %M | %B | %d")) +(setq cpu::*cpu-modeline-fmt* "%c" + mem::*mem-modeline-fmt* "%a %p" + wifi:*wifi-modeline-fmt* "%e %P" + ,*screen-mode-line-format* (list "%g %v %u ^> %I | %C | %M | %B | %d")) #+end_src This variable as you can see is a list of elements, although here I am