all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#19895: 24.4; battery.el does not support /sys/class/power_supply/BATX
@ 2015-02-18 15:53 Greg Farough
  2016-03-21  5:44 ` Marcin Borkowski
  2019-09-20 23:44 ` Stefan Kangas
  0 siblings, 2 replies; 3+ messages in thread
From: Greg Farough @ 2015-02-18 15:53 UTC (permalink / raw)
  To: 19895

It seems that battery-linux-sysfs does not support certain laptop
batteries which are not classified as BAT0, but by BATX instead. I had
to add this to my .emacs to get display-battery-mode working properly:

(eval-after-load 'battery
  '(progn
     (setq battery--linux-sysfs-regexp "[bB][aA][tT][xX]$")
     (setq battery-status-function 'battery-linux-sysfs
      battery-echo-area-format "Power %L, battery %B (%p%% charged, remaining time %t)"
      battery-mode-line-format " [%p%%] ")))
(display-battery-mode 1)

Hope this helps, and thanks for all your hard work.
-g

-- 
Ξυνὸν δέ μοί ἐστιν, ὁππόθεν ἄρξωμαι· τόθι γὰρ πάλιν ἵξομαι αὖθις.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-20 23:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-18 15:53 bug#19895: 24.4; battery.el does not support /sys/class/power_supply/BATX Greg Farough
2016-03-21  5:44 ` Marcin Borkowski
2019-09-20 23:44 ` Stefan Kangas

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.