stumpwm/modeline.lisp @ 30faa48af4ce
default tip
More
author |
Steve Losh <steve@stevelosh.com> |
date |
Mon, 19 Aug 2024 08:56:24 -0400 |
parents |
ea681bd9c52d |
children |
(none) |
(in-package :stumpwm-user)
(defun ensure-mode-line ()
(when (not (stumpwm::head-mode-line (current-head)))
(toggle-mode-line (current-screen) (current-head))))
(defun configure-modeline ()
(setf
*time-modeline-string*
"%a %b %e %H:%M"
cpu::*cpu-usage-modeline-fmt*
"^[~A~3D%^]"
cpu::*cpu-modeline-fmt*
"[%c] [%f]"
mem::*mem-modeline-fmt*
"%p"
*screen-mode-line-format*
(append
(list "[^B"
'(:eval (princ-to-string (group-number (current-group))))
":%n^b@%h] %W^>")
(list "(V %V) ")
;; battery and brightness for laptops
(hostcase
((:gro :juss)
(list "(B %B)"
" (BR "
'(:eval (princ-to-string (brightness)))
"%) ")))
;; temperature
(list "(TEMP %S) ")
;; cpu, mem, time, tray
(list "(CPU %C) (MEM%M) %d %T")
))
(setf *mode-line-timeout* 10)
(setf *mode-line-background-color* "#111111")
(ensure-mode-line))
(configure-modeline)