diff options
author | Thanos Apollo <[email protected]> | 2023-09-03 15:30:20 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-09-03 15:30:20 +0300 |
commit | f7c3db0c688b9b98762464cc9e4cc7c87a9dbe96 (patch) | |
tree | 5d42eadea41d1e6270007c7a82129ee5c93ac5f0 /.stumpwm.d/modeline.lisp | |
parent | 1d570b3c17d23ae9813769d99a3ed48133d7ee44 (diff) |
stumpwm: modularize
Diffstat (limited to '.stumpwm.d/modeline.lisp')
-rw-r--r-- | .stumpwm.d/modeline.lisp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/.stumpwm.d/modeline.lisp b/.stumpwm.d/modeline.lisp new file mode 100644 index 0000000..adac5ac --- /dev/null +++ b/.stumpwm.d/modeline.lisp @@ -0,0 +1,42 @@ +;; Modeline configuration +(load "~/.stumpwm.d/colors.lisp") +(load-module "battery-portable") + +(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 + *mode-line-foreground-color* thanos-hope-fg + stumpwm:*mode-line-border-color* thanos-hope + stumpwm:*mode-line-highlight-template* "«~A»") + + +(setf *mode-line-border-color* thanos-hope1 + *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:" + '(:eval (string-trim '(#\Newline) + (stumpwm:run-shell-command "pamixer --get-volume" t))) + "% | " + ;; Check when hermes(laptop) t display battery + (when (equal (asdf:hostname) "hermes") + "BAT:%B |") + "%d")) + + +(when stumpwm:*initializing* + (mode-line)) |