File: battery.el.html
There is at present support for GNU/Linux, BSD, macOS, and Windows.
This library supports:
- UPower (https://upower.freedesktop.org) via D-Bus API.
- The /sys/class/power_supply/ files of Linux >= 2.6.39.
- The /proc/acpi/ directory structure of Linux 2.4.20 and 2.6.
- The /proc/apm file format of Linux version 1.3.58 or newer.
- BSD by using the apm program.
- Darwin (macOS) by using the pmset program.
- Windows via the GetSystemPowerStatus API call.
Defined variables (21)
battery--upower-signals | Handles for UPower signal subscriptions. |
battery-echo-area-format | Control string formatting the string to display in the echo area. |
battery-linux-proc-apm-regexp | Regular expression matching contents of ‘/proc/apm’. |
battery-load-critical | Upper bound of critical battery load percentage. |
battery-load-low | Upper bound of low battery load percentage. |
battery-mode-line-format | Control string formatting the string to display in the mode line. |
battery-mode-line-limit | Percentage of full battery load below which display battery status. |
battery-mode-line-string | String to display in the mode line. |
battery-status-function | Function for getting battery status information. |
battery-update-functions | Functions run by ‘display-battery-mode’ after updating the status. |
battery-update-interval | Seconds after which the battery status will be updated. |
battery-update-timer | Interval timer object. |
battery-upower-device | Preferred UPower device name(s). |
battery-upower-device-interface | Name of the UPower Device D-Bus interface. |
battery-upower-device-path | D-Bus object providing ‘battery-upower-device-interface’. |
battery-upower-interface | Name of the UPower D-Bus interface. |
battery-upower-path | D-Bus object providing ‘battery-upower-interface’. |
battery-upower-service | Well-known name of the UPower D-Bus service. |
battery-upower-subscribe | Whether to subscribe to UPower device change signals. |
display-battery-mode | Non-nil if Display-Battery mode is enabled. |
display-battery-mode-hook | Hook run after entering or leaving ‘display-battery-mode’. |
Defined functions (23)
battery | () |
battery--call-process-to-string | (PROGRAM &rest ARGS) |
battery--files | (DIR) |
battery--find-linux-sysfs-batteries | () |
battery--search-haiku-acpi-status | () |
battery--upower-device-properties | (DEVICE) |
battery--upower-devices | () |
battery--upower-props-changed | (INTERFACE CHANGED INVALIDATED) |
battery--upower-signal-handler | (&rest _) |
battery--upower-state | (PROPS STATE) |
battery--upower-subscribe | () |
battery--upower-unsubscribe | () |
battery-bsd-apm | () |
battery-format | (FORMAT ALIST) |
battery-haiku-acpi-battery | () |
battery-linux-proc-acpi | () |
battery-linux-proc-apm | () |
battery-linux-sysfs | () |
battery-pmset | () |
battery-search-for-one-match-in-files | (FILES REGEXP MATCH-NUM) |
battery-update | () |
battery-upower | () |
display-battery-mode | (&optional ARG) |
Defined faces (2)
battery-load-critical | Face used in mode line string when battery load is critical. See the option `battery-load-critical'. |
battery-load-low | Face used in mode line string when battery load is low. See the option `battery-load-low'. |