Oh, i see. I suppose you have the directory */sys/class/power_supply/BAT0*. The battery module uses the */proc/acpi/battery/* path.
Try replacing */proc/acpi/battery/* with */sys/class/power_supply/ *in the *battery.lisp* file (line 28). If this works the module can be refactored to export another variable **battery-path**. Something like: ===================================== (export '(*battery-path*)) (defvar *battery-path* nil) (defun read-battery-file (battery fname) (let ((fields (make-hash-table :test #'equal))) (with-open-file (s (or *battery-path* (concatenate 'string "/proc/acpi/battery/" battery "/" fname) :if-does-not-exist nil) ....))) ================================= And then users could do *(setf *battery-path* "/sys/class/power_supply/BAT0") *after loading the module. That or just make the module check for */proc/acpi/ *and then */sys/class/power_supply/* or wathever. On 14 January 2015 at 00:41, Kete Foy <k...@ninthfloor.org> wrote: > On 01/10/2015 03:51 PM, Lucas Pandolfo wrote: > > Is it a notebook? > > > Yes > > > If it is, what does 'ls /proc/acpi/battery/ -l' return? > > > I don't have the battery directory in Parabola ("ArchLinux"). > > By the way, here is the shell command that I use to monitor the battery > charge (requires the acpi package): > (setf stumpwm:*screen-mode-line-format* > (list "%n |%w | %d | Battery" > '(:eval (stumpwm:run-shell-command "acpi |cut -d ',' -f 2" t)))) >
_______________________________________________ Stumpwm-devel mailing list Stumpwm-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/stumpwm-devel