diff options
author | Thanos Apollo <[email protected]> | 2024-01-31 04:08:08 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-01-31 04:08:08 +0200 |
commit | 9408f49ff7bd017157a2b700834bc794b9b82841 (patch) | |
tree | b9c48719636e3fab26f7e0b341100535287f8ea0 | |
parent | 6a8a93ee551d086d02c35f4354674369b51632ed (diff) |
stumpwm:(modeline) Use cpu & mem modules, use thanos-black colors
-rw-r--r-- | .stumpwm.d/modeline.lisp | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/.stumpwm.d/modeline.lisp b/.stumpwm.d/modeline.lisp index 2701e70..eee5db2 100644 --- a/.stumpwm.d/modeline.lisp +++ b/.stumpwm.d/modeline.lisp @@ -1,36 +1,30 @@ ;; Modeline configuration (load "~/.stumpwm.d/colors.lisp") (load-module "battery-portable") +(stumpwm:load-module "mem") +(stumpwm: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-hope ;"#252B48" +(setf *mode-line-background-color* thanos-black-bg ;"#252B48" *mode-line-foreground-color* thanos-hope-fg - *mode-line-border-color* thanos-hope - *mode-line-highlight-template* "«~A»") + *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-hope1 +(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 ^>" - "RAM:" - '(:eval (string-trim '(#\Newline) - (stumpwm:run-shell-command - "free | awk '/Mem/ { printf(\"%.2f%\"), $3/$2 * 100.0 }'" t))) - "% | CPU:" - '(:eval (string-trim '(#\Newline) - (stumpwm:run-shell-command - "grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {printf(\"%.2f\", usage)}'" t))) - "% | VOL:" + (list "%g ^> %C| RAM: %M | VOL:" '(:eval (string-trim '(#\Newline) - (stumpwm:run-shell-command "amixer sget Master | grep 'Right:' | awk -F'[][]' '{print $2}'" t))) + (stumpwm:run-shell-command "pamixer --get-volume" t))) "% | " ;; Check when hermes(laptop) t display battery (when (equal (asdf:hostname) "hermes") |