diff options
Diffstat (limited to 'stumpwm.org')
-rw-r--r-- | stumpwm.org | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/stumpwm.org b/stumpwm.org index a35d83e..f5e09c9 100644 --- a/stumpwm.org +++ b/stumpwm.org @@ -231,34 +231,32 @@ ,*mode-line-border-width* 2) (when *initializing* - (grename "[EMACS]") - (gnewbg "[BROWSER]") + (grename "[ALPHA]") + (gnewbg "[BETA]") + (gnewbg "[GAMMA]") + (gnewbg "[DELTA]") (gnewbg "[LAMBDA]")) (clear-window-placement-rules) (setf *dynamic-group-master-split-ratio* 1/2) - (defun get-hostname () - (with-open-file (stream "/etc/hostname") - (let ((hostname (read-line stream))) - (close stream) - hostname))) - (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 "exec ~/Developer/scripts/get-ram.sh" t))) + (stumpwm:run-shell-command + "free | awk '/Mem/ { printf(\"%.2f%\"), $3/$2 * 100.0 }'" t))) "% | CPU:" '(:eval (string-trim '(#\Newline) - (stumpwm:run-shell-command "exec ~/Developer/scripts/get-cpu.sh" t))) + (stumpwm:run-shell-command + "grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {printf \"%.2f%\n\", usage}'"t))) "% | VOL:" '(:eval (string-trim '(#\Newline) (stumpwm:run-shell-command "pamixer --get-volume" t))) "% | " ;; Check when hermes(laptop) t display battery - (when (equal (get-hostname) "hermes") + (when is-hermes "BAT:%B |") "%d")) (mode-line) |