]> git.eshelyaron.com Git - emacs.git/commit
Make 'M-x battery RET' work out-of-box for UPower users.
authorZajcev Evgeny <zevlg@yandex.ru>
Thu, 6 Feb 2020 07:35:12 +0000 (10:35 +0300)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 6 Feb 2020 14:13:19 +0000 (09:13 -0500)
commitd8f4317f03be69cfaf6a60bda228996590fd92b5
treefec080eabc57b32d6f384caec3e47f76cbaf3fd2
parent7e0a4b7ca5682026397610a05a19d3a2ef023d74
Make 'M-x battery RET' work out-of-box for UPower users.

* battery.el (battery-upower-prop): Removed in favor for
  'battery-upower-device-property'.
  (battery-upower-device): Can be nil, meaning autodetect the battery
  device.
  (battery-upower-line-power-device): New.  line-power device.  Can be
  nil, meaning autodetect line-power device.
  (battery-status-function): Check UPower service is available to use
  'battery-upower' as status function.
  (battery-upower): Speedup.  Request D-Bus only once, fetching all
  the properties at once.  Provide string for "%b" format spec.
  (battery-upower-device-list, battery-upower-device-all-properties,
  battery-upower-device-property): New functions to work with UPower
  devices.
  (battery-upower-dbus-service, battery-upower-dbus-interface,
  battery-upower-dbus-path, battery-upower-dbus-device-interface,
  battery-upower-dbus-device-path): New constants describing UPower
  D-Bus service.
lisp/battery.el