;ELC   
;;; Compiled
;;; in Emacs version 29.4
;;; with all optimizations.



(byte-code "\300\301!\210\302\303\304\305\306\307\310\311&\210\312\313\314\315\316DD\317\320\321\322\323&\210\312\324\314\315\325DD\326\320\321\322\327&\207" [require dbus custom-declare-group battery nil "Display battery status information." :prefix "battery-" :group hardware custom-declare-variable battery-upower-device funcall function #[0 "\300\207" [nil] 1 #1=""] "Preferred UPower device name(s).\nWhen `battery-status-function' is set to `battery-upower', this\nuser option specifies which power sources to query for status\ninformation and merge into a single report.\n\nWhen nil (the default), `battery-upower' queries all present\nbattery and line power devices as determined by the UPower\nEnumerateDevices method.  A string or a nonempty list of strings\nnames particular devices to query instead.  UPower battery and\nline power device names typically follow the patterns\n\"battery_BATN\" and \"line_power_ACN\", respectively, with N\nstarting at 0 when present.  Device names should not include the\nleading D-Bus path \"/org/freedesktop/UPower/devices/\"." :version "28.1" :type (choice (const :tag "Autodetect all devices" nil) (string :tag "Device") (repeat :tag "Devices" string)) battery-upower-subscribe #[0 "\300\207" [t] 1 #1#] "Whether to subscribe to UPower device change signals.\nWhen nil, battery status information is polled every\n`battery-update-interval' seconds.  When non-nil (the default),\nthe battery status is also updated whenever a power source is\nadded or removed, or when the system starts or stops running on\nbattery power.\n\nThis only takes effect when `battery-status-function' is set to\n`battery-upower' before enabling `display-battery-mode'." boolean] 8)#@107 Well-known name of the UPower D-Bus service.
See URL `https://upower.freedesktop.org/docs/ref-dbus.html'.
(defconst battery-upower-service "org.freedesktop.UPower" (#$ . 1796))#@108 Return a list of absolute file names in DIR or nil on error.
Value does not include "." or "..".

(fn DIR)
(defalias 'battery--files #[257 "\3011 \302\303#0\207\210\304\207" [directory-files-no-dot-files-regexp (error) directory-files t nil] 5 (#$ . 1979)])#@49 Return a list of all sysfs battery directories.
(defalias 'battery--find-linux-sysfs-batteries #[0 "\300\301\302!\211\203 \211@\303\304\305\"!\203 \211B\262A\266\202\202 \210\211\237\207" [nil battery--files "/sys/class/power_supply/" file-exists-p expand-file-name "capacity"] 7 (#$ . 2245)])
(byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\315\316\310\317&\207" [custom-declare-variable battery-status-function funcall function #[0 "\302 \235\203	 \303\207	\304=\203 \305\306!\203 \307 \203 \310\207	\304=\203* \311\312!\203* \313\207	\304=\203> \305\314!\203> \305\315!\203> \316\207	\317=\203L \320\321!\203L \322\207	\323=\203\201 \3241z \325\326\327\"r\211q\210\330\331\"\216\332\333\334\327\334\335\336&\337=\205s o?*\2620\202| \210\334\203\201 \340\207	\341=\203\217 \311\342!\203\217 \343\207\344\345!\205\226 \345\207" [battery-upower-service system-type dbus-list-activatable-names battery-upower gnu/linux file-readable-p "/sys/" battery--find-linux-sysfs-batteries battery-linux-sysfs file-directory-p "/proc/acpi/battery" battery-linux-proc-acpi "/proc/" "/proc/apm" battery-linux-proc-apm berkeley-unix file-executable-p "/usr/sbin/apm" battery-bsd-apm darwin (error) generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205	 \302\300!\207" [V0 buffer-name kill-buffer] 2] call-process "pmset" nil "-g" "ps" 0 battery-pmset haiku "/dev/power/acpi_battery" battery-haiku-acpi-battery fboundp w32-battery-status] 8 #1=""] "Function for getting battery status information.\nThe function has to return an alist of conversion definitions.\nIts cons cells are of the form\n\n    (CONVERSION . REPLACEMENT-TEXT)\n\nCONVERSION is the character code of a \"conversion specification\"\nintroduced by a `%' character in a control string." :version "28.1" :type (choice (const nil) function) battery-echo-area-format #[0 "\300\207" ["Power %L, battery %B (%p%% load, remaining time %t)"] 1 #1#] "Control string formatting the string to display in the echo area.\nOrdinary characters in the control string are printed as-is, while\nconversion specifications introduced by a `%' character in the control\nstring are substituted as defined by the current value of the variable\n`battery-status-function'.  Here are the ones generally available:\n%c Current capacity (mAh or mWh)\n%r Current rate of charge or discharge\n%L AC line status (verbose)\n%B Battery status (verbose)\n%b Battery status: empty means high, `-' means low,\n   `!' means critical, and `+' means charging\n%d Temperature (in degrees Celsius)\n%p Battery load percentage\n%s Remaining time (to charge or discharge) in seconds\n%m Remaining time (to charge or discharge) in minutes\n%h Remaining time (to charge or discharge) in hours\n%t Remaining time (to charge or discharge) in the form `h:min'\n\nThe full `format-spec' formatting syntax is supported." :link (info-link "(elisp) Custom Format Strings") (choice string (const nil))] 8)#@37 String to display in the mode line.
(defvar battery-mode-line-string nil (#$ . 5221))
(byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\315\316\310\317&\210\300\320\302\303\321DD\322\310\311%\210\300\323\302\303\324DD\325\310\311%\210\300\326\302\303\327DD\330\310\311%\207" [custom-declare-variable battery-mode-line-limit funcall function #[0 "\300\207" [100] 1 #1=""] "Percentage of full battery load below which display battery status." :version "24.1" :type integer battery-mode-line-format #[0 "\301=\203 \302\207\205 \303\207" [battery-status-function battery-linux-proc-acpi "[%b%p%%,%d°C] " "[%b%p%%] "] 2 #1#] "Control string formatting the string to display in the mode line.\nOrdinary characters in the control string are printed as-is, while\nconversion specifications introduced by a `%' character in the control\nstring are substituted as defined by the current value of the variable\n`battery-status-function'.  Here are the ones generally available:\n%c Current capacity (mAh or mWh)\n%r Current rate of charge or discharge\n%L AC line status (verbose)\n%B Battery status (verbose)\n%b Battery status: empty means high, `-' means low,\n   `!' means critical, and `+' means charging\n%d Temperature (in degrees Celsius)\n%p Battery load percentage\n%s Remaining time (to charge or discharge) in seconds\n%m Remaining time (to charge or discharge) in minutes\n%h Remaining time (to charge or discharge) in hours\n%t Remaining time (to charge or discharge) in the form `h:min'\n\nThe full `format-spec' formatting syntax is supported." :link (info-link "(elisp) Custom Format Strings") (choice string (const nil)) battery-update-interval #[0 "\300\207" [60] 1 #1#] "Seconds after which the battery status will be updated." battery-load-low #[0 "\300\207" [25] 1 #1#] "Upper bound of low battery load percentage.\nA battery load percentage below this number is considered low." battery-load-critical #[0 "\300\207" [10] 1 #1#] "Upper bound of critical battery load percentage.\nA battery load percentage below this number is considered critical."] 8)
(custom-declare-face 'battery-load-low '((t :inherit warning)) "Face used in mode line string when battery load is low.\nSee the option `battery-load-low'." :version "28.1")
(custom-declare-face 'battery-load-critical '((t :inherit error)) "Face used in mode line string when battery load is critical.\nSee the option `battery-load-critical'." :version "28.1")#@24 Interval timer object.
(defvar battery-update-timer nil (#$ . 7694))#@185 Display battery status information in the echo area.
The text being displayed in the echo area is controlled by the variables
`battery-echo-area-format' and `battery-status-function'.
(defalias 'battery #[0 "\302\303\203 	\203 \304	 \"\202 \305\"\207" [battery-echo-area-format battery-status-function message "%s" battery-format "Battery status not available"] 5 (#$ . 7769) nil])
(byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\315\316\317\320\310\321&	\207" [custom-declare-variable battery-update-functions funcall function #[0 "\300\207" [nil] 1 #1=""] "Functions run by `display-battery-mode' after updating the status.\nThese functions will be called with one parameter, an alist that\ncontains data about the current battery status.  The keys in the\nalist are single characters and the values are strings.\nDifferent battery backends deliver different information, so some\nof the following information may or may not be available:\n\n    v: driver-version\n    V: bios-version\n    I: bios-interface\n    L: line-status\n    B: battery-status\n    b: battery-status-symbol\n    p: load-percentage\n    s: seconds\n    m: minutes\n    h: hours\n    t: remaining-time\n\nFor instance, to play an alarm when the battery power dips below\n10%, you could use a function like the following:\n\n  (defvar my-prev-battery nil)\n  (defun my-battery-alarm (data)\n    (when (and my-prev-battery\n               (equal (alist-get ?L data) \"off-line\")\n               (< (string-to-number (alist-get ?p data)) 10)\n               (>= (string-to-number (alist-get ?p my-prev-battery)) 10))\n      (play-sound-file \"~/alarm.wav\" 5))\n    (setq my-prev-battery data))" :version "29.1" :type (repeat function) display-battery-mode #[0 "\300\207" [nil] 1 #1#] "Non-nil if Display-Battery mode is enabled.\nSee the `display-battery-mode' command\nfor a description of this minor mode.\nSetting this variable directly does not take effect;\neither customize it (see the info node `Easy Customization')\nor call the function `display-battery-mode'." :set custom-set-minor-mode :initialize custom-initialize-default boolean] 10)#@1014 Toggle battery status display in mode line (Display Battery mode).

The text displayed in the mode line is controlled by
`battery-mode-line-format' and `battery-status-function'.
The mode line is be updated every `battery-update-interval'
seconds.

The function which updates the mode-line display will call the
functions in `battery-update-functions', which can be used to
trigger actions based on battery-related events.

This is a global minor mode.  If called interactively, toggle the
`Display-Battery mode' mode.  If the prefix argument is positive,
enable the mode, and if it is zero or negative, disable the mode.

If called from Lisp, toggle the mode if ARG is `toggle'.  Enable
the mode if ARG is nil, omitted, or is a positive number.
Disable the mode if ARG is a negative number.

To check whether the minor mode is enabled in the current buffer,
evaluate `(default-value \='display-battery-mode)'.

The mode's hook is called both when the mode is enabled and when
it is disabled.

(fn &optional ARG)
(defalias 'display-battery-mode #[256 "\306 \307\310\311=\203 \312\310!?\202! \247\203  \313W\203  \314\202! \315\"\210\316\300!\2038 \317\310\"\312\310!\2038 \310B\320\n\204@ \321\203H \322!\210\323 \210\f\203\201 \203\201 \204` \317\301\n\"\202\210 \324\302\301\315#\210\f\325=\203t (\203t \326 \210\327\314)\330#\331 \210\202\210 \332\333!\210\314\334\335\312\310!\203\224 \336\202\225 \337\"\210\340\341!\203\276 \342\310!\210\306 \203\255 \211\306 \232\203\276 \332\343\344\312\310!\203\272 \345\202\273 \346\320$\210\210\347 \210\312\310!\207" [global-minor-modes battery-mode-line-string global-mode-string battery-update-timer battery-status-function battery-mode-line-format current-message set-default display-battery-mode toggle default-value 1 nil t boundp delq #1="" (#1#) cancel-timer battery--upower-unsubscribe add-to-list battery-upower battery--upower-subscribe run-at-time battery-update-handler battery-update message "Battery status not available" run-hooks display-battery-mode-hook display-battery-mode-on-hook display-battery-mode-off-hook called-interactively-p any customize-mark-as-set "%s %sabled%s" "Display-Battery mode" "en" "dis" force-mode-line-update battery-upower-subscribe battery-update-interval] 7 (#$ . 9942) (byte-code "\203\n \301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)])
(defvar display-battery-mode-hook nil)
(byte-code "\301\302N\204\f \303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\310\313\300!\205# \310\211%\207" [display-battery-mode-map display-battery-mode-hook variable-documentation put "Hook run after entering or leaving `display-battery-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it.  (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode display-battery-mode boundp] 6)
(defalias 'battery-update-handler #[0 "\300 \210\301\302!\207" [battery-update sit-for 0] 2])#@53 Update battery status information in the mode line.
(defalias 'battery-update #[0 "\205  \306\307\236A!@	\205  \211\247\203 \211\nX\205  \310	\"\211G\211\311U\204W \247\203N W\203? \312\311\303\313%\210\202N \fW\203N \312\311\304\313%\210\314\311\315\316%\210\206\\ \317\320\321\"\266\322\313!\207" [battery-status-function battery-mode-line-format battery-mode-line-limit battery-load-critical battery-load-low battery-mode-line-string read-from-string 112 battery-format 0 add-face-text-property t put-text-property help-echo "Battery status information" "" run-hook-with-args battery-update-functions force-mode-line-update] 10 (#$ . 12945)])
(put 'battery--linux-proc-apm 'rx-definition '((: bol (group (+ (not 32))) " " (group (+ (not 32))) " 0x" (group (+ xdigit)) " 0x" (group (+ xdigit)) " 0x" (group (+ xdigit)) " 0x" (group (+ xdigit)) " " (group (32 45) (+ digit)) 37 " " (group (32 45) (+ digit)) " " (group (* nonl)) eol)))#@54 Regular expression matching contents of `/proc/apm'.
(defconst battery-linux-proc-apm-regexp "^\\([^ ]+\\) \\([^ ]+\\) 0x\\([[:xdigit:]]+\\) 0x\\([[:xdigit:]]+\\) 0x\\([[:xdigit:]]+\\) 0x\\([[:xdigit:]]+\\) \\(-?[[:digit:]]+\\)% \\(-?[[:digit:]]+\\) \\(.*\\)$" (#$ . 13910))
(make-obsolete-variable 'battery-linux-proc-apm-regexp "it is no longer used." "28.1")#@664 Get APM status information from Linux (the kernel).
This function works only with the new `/proc/apm' format introduced
in Linux version 1.3.58.

The following %-sequences are provided:
%v Linux driver version
%V APM BIOS version
%I APM BIOS status (verbose)
%L AC line status (verbose)
%B Battery status (verbose)
%b Battery status, empty means high, `-' means low,
   `!' means critical, and `+' means charging
%p Battery load percentage
%s Remaining time (to charge or discharge) in seconds
%m Remaining time (to charge or discharge) in minutes
%h Remaining time (to charge or discharge) in hours
%t Remaining time (to charge or discharge) in the form `h:min'
(defalias 'battery-linux-proc-apm #[0 "\300\211\211\211\211\211\211\211\211\211\211\211\301\302\303\"r\211q\210\304\305\"\216\3061% \307\310!0\210\202& \210\311\312\300\303#\203\313\314!\262\313\315!\262\f\316\313\317!\320\"\262\321\315\"\322U\203O \323\262\202\324\262\321\320\"\322U\204a \325\262\202m \321\326\"\322U\204m \327\262\316\313\330!\320\"\262\322U\203\201 \331\262\n\202\226 \314U\203\215 \332\262\n\202\226 \315U\203\226 \333\262\n\316\313\334!\320\"\335U\204\316\313\336!\320\"\262\322U\203\270 \337\262	\340\262\202\342 \314U\203\307 \341\262	\342\262\202\342 \315U\203\326 \343\262	\344\262\202\342 \317U\203\342 \345\262	\346\262\313\347!\262\316\313\350!!\262\313\351!\352\230\203\374 \353_\262\353\245\262\354\245\262\355\356\353\246#\262*\210\357\f\206\360B\361\f\206!\360B\362\f\206)\360B\363\f\2061\360B\364\f\2069\360B\365\f\206A\340B\366\f\206I\360B\367\f\203W\370!\202X\360B\371\f\203f\370!\202g\360B\372\f\203u\370!\202v\360B\373\f\206~\360B\257\207" [nil generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205	 \302\300!\207" [V0 buffer-name kill-buffer] 2] (error) insert-file-contents "/proc/apm" re-search-forward "^\\([^ ]+\\) \\([^ ]+\\) 0x\\([[:xdigit:]]+\\) 0x\\([[:xdigit:]]+\\) 0x\\([[:xdigit:]]+\\) 0x\\([[:xdigit:]]+\\) \\(-?[[:digit:]]+\\)% \\(-?[[:digit:]]+\\) \\(.*\\)$" match-string 1 2 string-to-number 3 16 logand 0 "not supported" "enabled" "disabled" 32 "disengaged" 4 "off-line" "on-line" "on backup" 6 255 5 "high" "" "low" "-" "critical" "!" "charging" "+" 7 8 9 "min" 60 3600 format "%d:%02d" 118 "N/A" 86 73 76 66 98 112 115 number-to-string 109 104 116] 24 (#$ . 14278)])
(byte-code "\300\301\302\303#\210\300\304\302\305#\207" [put battery--acpi-rate rx-definition ((&rest hour) (: (group (+ digit)) " " (group 109 (in "AW") hour))) battery--acpi-capacity ((battery--acpi-rate 104))] 4)#@650 Get ACPI status information from Linux (the kernel).
This function works only with the `/proc/acpi/' interface
introduced in Linux version 2.4.20 and 2.6.0.

The following %-sequences are provided:
%c Current capacity (mAh)
%r Current rate of charge or discharge
%L AC line status (verbose)
%B Battery status (verbose)
%b Battery status, empty means high, `-' means low,
   `!' means critical, and `+' means charging
%d Temperature (in degrees Celsius)
%p Battery load percentage
%m Remaining time (to charge or discharge) in minutes
%h Remaining time (to charge or discharge) in hours
%t Remaining time (to charge or discharge) in the form `h:min'
(defalias 'battery-linux-proc-acpi #[0 "\300\211\301\300\211\301\211\211\211\211\211\302\303\304\"r\211q\210\305\306\"\216\307\310!\211\203\211@\31114 \312\313\314\"\301\211\211\304%0\210\2025 \210eb\210\315\316\301\304#\203\245 \315\317\301\304#\203S \320\235\203S \321\322!\262\315\323\301\304#\203\217 \206a \300\324\321\322!!\\\262\300V\203\217 \204} \321\325!\262\202\217 \321\325!\230\204\217 \326\327\321\325!#\210\315\330\301\304#\203\245 \206\235 \300\324\321\322!!\\\262	db\210\3311\267 \312\313\332\"!0\210\202\270 \210\315\316\301\304#\203\315\333\301\304#\203\322 \324\321\322!!\\\262\315\334\301\304#\203\344 \f\324\321\322!!\\\262\315\335\301\304#\203\366 \n\324\321\322!!\\\262\315\336\301\304#\203	\324\321\322!!\\\262\nA\266\202\202 *\266	\300V\203	\202 \n\262	\203Q\203Q\300U\2034\300\202J\337\340\230\203C	Z\202E\341_\"\262\341\245\262\342\203^\343!\202_\344B\345\346\347\350\307\351!\"\352\322#\206o\344B\353\346\347\354\307\355!\"\356\322#\206\344B\357\203\221\343	!\360	Q\202\222\344B\361\206\232\344B\362\340\230\203\247\363\202\312\203\270W\203\270\364\202\312\203\311W\203\311\365\202\312\366B\367\203\330\343!\202\331\344B\370	\203\347\343\n!\202\350\344B\371\n\203\373\372\373\341\246#\202\374\344B\374\203\203\300V\203\343\337\353_\"!\202\344B\257\n\207" [0 nil generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205	 \302\300!\207" [V0 buffer-name kill-buffer] 2] battery--files "/proc/acpi/battery/" (error) insert-file-contents expand-file-name "state" re-search-forward "present:[[:space:]]+yes$" "charging state:[[:space:]]+\\([^[:space:]].*\\)$" ("unknown" "charged" nil) match-string 1 "present rate:[[:space:]]+\\([[:digit:]]+\\) \\(m[AW]\\)$" string-to-number 2 error "Inconsistent rate types (%s vs. %s)" "remaining capacity:[[:space:]]+\\([[:digit:]]+\\) \\(m[AW]h\\)$" (error) "info" "design capacity:[[:space:]]+\\([[:digit:]]+\\) \\(m[AW]h\\)$" "last full capacity:[[:space:]]+\\([[:digit:]]+\\) \\(m[AW]h\\)$" "design capacity warning:[[:space:]]+\\([[:digit:]]+\\) \\(m[AW]h\\)$" "design capacity low:[[:space:]]+\\([[:digit:]]+\\) \\(m[AW]h\\)$" floor "charging" 60 99 number-to-string "N/A" 76 battery-search-for-one-match-in-files mapcar #[257 "\300\301\"\207" [expand-file-name "state"] 4 "\n\n(fn D)"] "/proc/acpi/ac_adapter/" "state:[[:space:]]+\\([^[:space:]].*\\)$" 100 #[257 "\300\301\"\207" [expand-file-name "temperature"] 4 "\n\n(fn D)"] "/proc/acpi/thermal_zone/" "temperature:[[:space:]]+\\([[:digit:]]+\\) C$" 114 " " 66 98 "+" "!" "-" "" 104 109 116 format "%d:%02d" 112] 25 (#$ . 16873)])#@657 Get sysfs status information from Linux kernel.
This function works only with the new `/sys/class/power_supply/'
interface introduced in Linux version 2.4.25.

The following %-sequences are provided:
%c Current capacity (mAh or mWh)
%r Current rate of charge or discharge
%L Power source (verbose)
%B Battery status (verbose)
%b Battery status, empty means high, `-' means low,
   `!' means critical, and `+' means charging
%d Temperature (in degrees Celsius)
%p Battery load percentage
%m Remaining time (to charge or discharge) in minutes
%h Remaining time (to charge or discharge) in hours
%t Remaining time (to charge or discharge) in the form `h:min'
(defalias 'battery-linux-sysfs #[0 "\302\211\211\303\304\211\211\211\305\306\307\"r\211q\210\310\311\"\216\312 \211\203@\211@\31310 \314\315\316\"\304\211\211\307%0\210\2025 \210\2025 \210eb\210\317\320\304\307#\203I \321\322\323!!\324\245\262eb\210\317\325\304\307#\2039eb\210\317\326\304\307#\203k \327\235\203k \322\323!\262eb\210\317\330\304\307#\203\217 \321\322\331!!\323\224f\332=\203\212 	\202\213 \323_\\\262	eb\210\317\333\304\307#\203\237 \322\323!\262eb\210\304\211\317\334\304\307#\203\341 \322\323!\211\262\203\341 \317\335\304\307#\203\341 \322\323!\211\262\203\341 \f\321!_\\\262\321!_\\\262\f\266\202eb\203\317\336\304\307#\203\322\323!\211\262\203\317\337\304\307#\203\322\323!\211\262\203\f\321!\\\262\321!\\\262\f\266\340U\2049\341\230\203-	\2022\n\nZ\211\n\245\262\210A\266\202\202 *\266\340V\203Z\340V\203Z\342_\245\262\343\340V\204i\340V\203s\344\245!\202t\345B\346\302V\203\207\347\350	\324\245\"\202\210\345B\351\203\230\347\352\353_\"\202\231\345B\354\203\247\347\352\"\202\250\345B\355\203\277\347\356\211\357!Z\353_#\202\300\345B\342\206\310\345B\360\n\206\320\345B\361\362\230\203\335\363\202\375\204\346\364\202\375W\203\361\365\202\375	W\203\374\366\202\375\364B\367	\203\f\347\350\"\202\345B\370\371\372\373\340#\211\374\267\202\"\375\202#\376\202#\345\262B\257\n\207" [battery-load-critical battery-load-low 0.0 10.8 nil generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205	 \302\300!\207" [V0 buffer-name kill-buffer] 2] battery--find-linux-sysfs-batteries (error) insert-file-contents expand-file-name "uevent" re-search-forward "POWER_SUPPLY_VOLTAGE_NOW=\\([0-9]*\\)$" string-to-number match-string 1 1000000.0 "POWER_SUPPLY_PRESENT=1$" "POWER_SUPPLY_STATUS=\\(.*\\)$" ("Unknown" "Full" nil) "POWER_SUPPLY_\\(CURRENT\\|POWER\\)_NOW=\\([0-9]*\\)$" 2 67 "POWER_SUPPLY_TEMP=\\([0-9]*\\)$" "POWER_SUPPLY_CHARGE_FULL=\\([0-9]*\\)$" "POWER_SUPPLY_CHARGE_NOW=\\([0-9]*\\)$" "POWER_SUPPLY_ENERGY_FULL=\\([0-9]*\\)$" "POWER_SUPPLY_ENERGY_NOW=\\([0-9]*\\)$" 0 "Discharging" 100 99 number-to-string "N/A" 114 format "%.1f" 109 "%d" 60 104 116 "%d:%02d" floor 66 98 "Charging" "+" "" "!" "-" 112 76 battery-search-for-one-match-in-files ("/sys/class/power_supply/AC/online" "/sys/class/power_supply/ACAD/online" "/sys/class/power_supply/ADP1/online") "[01]" #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("0" 538 "1" 542)) "BAT" "AC"] 22 (#$ . 20227)])#@672 Search forward for battery status in the current buffer.
Return a property list once all relevant properties are found.
The following properties may be inside the list:

  - `:capacity' (the current capacity of the battery.)
  - `:voltage' (the current voltage of the battery.)
  - `:rate', (the current rate of charge or discharge.)
  - `:state' (the current state of the battery.)
  - `:design-capacity' (the design capacity of the battery.)
  - `:design-voltage' (the design voltage of the battery.)
  - `:last-full-charge' (the capacity at the last full charge of
    the battery.)

`:capacity' and `:design-capacity' are both represented in
terms of milliamp-hours.
(defalias 'battery--search-haiku-acpi-status #[0 "\300\211\211\211\211\211\211\211\301\302!\203, \303\304\305!!\262\303\304\306!!\262\303\304\307!!\262\303\304\310!!\311\245\262\301\312!\203G \303\304\305!!\262\303\304\306!!\262\303\304\307!!\262\301\313!\203V \303\304\305!!\311\245\262\314=\203m \245\262\245\262\245\262\315\316\317	\320\321\306\"\314U\204\203 \322\202\240 \321\305\"\314U\204\221 \323\202\240 \321\310\"\314U\204\237 \324\202\240 \325\326\n\327\330\257\207" [nil re-search-forward "State \\([[:digit:]]+\\), Current Rate \\([[:digit:]]+\\), Capacity \\([[:digit:]]+\\), Voltage \\([[:digit:]]+\\)" string-to-number match-string 1 2 3 4 1000.0 "Power Unit \\([[:digit:]]\\)+, Design Capacity \\([[:digit:]]+\\), Last Full Charge \\([[:digit:]]+\\)" "Design Voltage \\([[:digit:]]+\\)" 0 :capacity :voltage :rate :state logand charging discharging critical fully-charged :design-capacity :design-voltage :last-full-charge] 22 (#$ . 23457)])#@403 Get battery status from `/dev/power/acpi_battery'.
This function only works on Haiku systems with an ACPI battery.

The following %-sequences are provided:
%c Current capacity (mAh)
%r Current rate of charge or discharge
%L AC line status (verbose)
%B Battery status (verbose)
%b Battery status: empty means high, `-' means low,
   `!' means critical, and `+' means charging
%p Battery load percentage
(defalias 'battery-haiku-acpi-battery #[0 "\300\301\302\"r\211q\210\303\304\"\216\305\306!\211\203$ \211@\307\310\306\"!\210A\266\202\202 \210\3111/ \312 0\2021 \210\313\211\203\256 \314\315\316\317\320\"\"B\321\315\316\317\322\"\"B\323\324\317\325\"!B\326\317\325\"\211\327=\203^ \330\202\203 \211\331=\203x \317\320\"\317\332\"\245\333W\203x \334\202\203 \211\335=\203\202 \336\202\203 \337\262B\340\317\325\"\331=\204\225 \341\202\226 \342B\343\315\316\344\317\n\320\"\317\332\"\245_\"B\257\202\257 \345*\207" [generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205	 \302\300!\207" [V0 buffer-name kill-buffer] 2] battery--files "/dev/power/acpi_battery" insert-file-contents expand-file-name (error) battery--search-haiku-acpi-status nil 99 format "%.0f" plist-get :capacity 114 :rate 66 symbol-name :state 98 charging "+" discharging :last-full-charge 0.15 "-" critical "!" "" 76 "on-line" "off-line" 112 100 ((99 . "N/A") (114 . "N/A") (66 . "N/A") (98 . "N/A") (112 . "N/A"))] 15 (#$ . 25128)])#@96 Name of the UPower D-Bus interface.
See URL `https://upower.freedesktop.org/docs/UPower.html'.
(defconst battery-upower-interface "org.freedesktop.UPower" (#$ . 26565))#@52 D-Bus object providing `battery-upower-interface'.
(defconst battery-upower-path "/org/freedesktop/UPower" (#$ . 26739))#@103 Name of the UPower Device D-Bus interface.
See URL `https://upower.freedesktop.org/docs/Device.html'.
(defconst battery-upower-device-interface "org.freedesktop.UPower.Device" (#$ . 26866))#@59 D-Bus object providing `battery-upower-device-interface'.
(defconst battery-upower-device-path "/org/freedesktop/UPower/devices" (#$ . 27061))#@42 Handles for UPower signal subscriptions.
(defvar battery--upower-signals nil (#$ . 27209))#@73 Update battery status on receiving a UPower D-Bus signal.

(fn &rest _)
(defalias 'battery--upower-signal-handler #[128 "\301!\207" [battery-update-timer timer-event-handler] 3 (#$ . 27305)])#@151 Update status when system starts/stops running on battery.
Intended as a UPower PropertiesChanged signal handler.

(fn INTERFACE CHANGED INVALIDATED)
(defalias 'battery--upower-props-changed #[771 "\300\301\"\205	 \302 \207" [assoc "OnBattery" battery--upower-signal-handler] 6 (#$ . 27504)])#@48 Unsubscribe from UPower device change signals.
(defalias 'battery--upower-unsubscribe #[0 "\301\302\"\210\303\211\207" [battery--upower-signals mapc dbus-unregister-object nil] 3 (#$ . 27803)])#@44 Subscribe to UPower device change signals.
(defalias 'battery--upower-subscribe #[0 "\305\306	\n\307\310&B\311\211\205& \211@\305\306	\f\312&BA\266\202\202 \207" [battery-upower-service battery-upower-path dbus-interface-properties battery--upower-signals battery-upower-interface dbus-register-signal :system "PropertiesChanged" battery--upower-props-changed ("DeviceAdded" "DeviceRemoved") battery--upower-signal-handler] 9 (#$ . 28004)])#@79 Return value for all available properties for the UPower DEVICE.

(fn DEVICE)
(defalias 'battery--upower-device-properties #[257 "\303\304\305	\"\n$\207" [battery-upower-service battery-upower-device-path battery-upower-device-interface dbus-get-all-properties :system expand-file-name] 7 (#$ . 28461)])#@63 List all UPower devices according to `battery-upower-device'.
(defalias 'battery--upower-devices #[0 ";\203 C\207\206( \3051 \306\307	\n\310\311\312&0\207\f\205& \313@A\"\262\207" [battery-upower-device battery-upower-service battery-upower-path battery-upower-interface dbus-debug (dbus-error) dbus-call-method :system "EnumerateDevices" :timeout 1000 signal] 8 (#$ . 28772)])#@317 Merge the UPower battery state in PROPS with STATE.
This is an extension of the UPower DisplayDevice algorithm for
merging multiple battery states into one.  PROPS is an alist of
battery properties from `battery-upower-device-interface', and
STATE is a symbol representing the state to merge with.

(fn PROPS STATE)
(defalias 'battery--upower-state #[514 "\300\301\"A\211\302\267\202# \303\202$ \304\202$ \305\202$ \306\202$ \307\202$ \310\202$ \311\262\312\311D\"\303>\206U \304>\206U \307>\206U \310>\206U \211A\204M \211\202U \313\314\"\205U \211@\207" [assoc "State" #s(hash-table size 6 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (1 11 2 15 3 19 4 23 5 27 6 31)) charging discharging empty fully-charged pending-charge pending-discharge nil delq apply eq] 7 (#$ . 29166)])#@668 Get battery status from UPower D-Bus interface.
This function works only in systems that provide a UPower D-Bus
service.

The following %-sequences are provided:
%c Current capacity (mWh)
%r Current rate of charge or discharge
%L AC line status (verbose)
%B Battery status (verbose)
%b Battery status: empty means high, `-' means low,
   `!' means critical, and `+' means charging
%d Temperature (in degrees Celsius)
%p Battery load percentage
%s Remaining time (to charge or discharge) in seconds
%m Remaining time (to charge or discharge) in minutes
%h Remaining time (to charge or discharge) in hours
%t Remaining time (to charge or discharge) in the form `h:min'
(defalias 'battery-upower #[0 "\302\303\211\211\211\211\211\211\211\211\211\211\211\211\304 \211\203\343 \211@\305!\262\306\307\"A\262\310=\203D \f\311=\204D \306\312\"A\203> \311\202? \313\262\202\334 \314=\203\334 \306\315\"A\203\334 T\262\316\"\262\f\306\317\"A\306\320\"A\306\321\"A\306\322\"A\306\323\"A\306\324\"A\203\224 \206\217 \302\\\262\f\203\242 \n\206\236 \302\\\262\203\260 \206\254 \302\\\262\203\276 \206\272 \302\\\262\203\314 	\206\310 \302\\\262\n\211\203\332 \206\326 \302\\\262	\266A\266\202\202 \210\310V\203\203\367 \245\262	\203\245\262\n\311=\203\211\202\211\262\203!\325\245\262\326\245\262\327\2030\330\331\332_\"\2021\333B\334\203?\330\335\"\202@\333B\336\311=\203M\337\202W\203V\340\202W\333B\341\330\342\206a\343\"B\344\345=\203o\346\202\220\203W\203\347\202\220\203\217	W\203\217\350\202\220\351B\352\203\246\302U\204\246\330\331\"\202\247\333B\353\203\266\330\331\"\202\267\333B\354\203\305\355!\202\306\333B\356\203\324\355!\202\325\333B\357\203\343\355!\202\344\333B\360\203\367\330\361\325\246#\202\370\333B\257\207" [battery-load-critical battery-load-low 0 nil battery--upower-devices battery--upower-device-properties assoc "Type" 1 online "Online" t 2 "IsPresent" battery--upower-state "Energy" "EnergyRate" "Percentage" "Temperature" "TimeToEmpty" "TimeToFull" 60 3600 99 format "%.0f" 1000 "N/A" 114 "%.1f W" 76 "on-line" "off-line" 66 "%s" unknown 98 charging "+" "!" "-" "" 100 112 115 number-to-string 109 104 116 "%d:%02d"] 30 (#$ . 29980)])#@27 

(fn PROGRAM &rest ARGS)
(defalias 'battery--call-process-to-string #[385 "\301\302\303\"\304\216rq\210\305\306\307\303\307&*\210rq\210\310 +\207" [standard-output generate-new-buffer " *string-output*" t #[0 "\301!\207" [standard-output kill-buffer] 2] apply call-process nil buffer-string] 9 (#$ . 32318)])#@539 Get APM status information from BSD apm binary.
The following %-sequences are provided:
%P Advanced power saving mode state (verbose)
%L AC line status (verbose)
%B Battery status (verbose)
%b Battery status, empty means high, `-' means low,
   `!' means critical, and `+' means charging
%p Battery load percentage
%s Remaining time (to charge or discharge) in seconds
%m Remaining time (to charge or discharge) in minutes
%h Remaining time (to charge or discharge) in hours
%t Remaining time (to charge or discharge) in the form `h:min'
(defalias 'battery-bsd-apm #[0 "\300\301\302!!@\211\303\267\202 \304\202 \305\202 \306\307P\300\301\310\"!\311\232\203( \312\202) \313\314\315\316\"8!\211\317\267\202K \320\202L \321\202L \322\202L \323\202L \324\202L \325\262\315\326\"8\315\327\"8\314\315\330\"8!\211\331\267\202v \332\202w \333\202w \334\202w \325\262\314\315\335\"8!	\336\230\203\240 \211\337\267\202\234 \340\202\253 \341\202\253 \342\202\253 \325\202\253 \211\343=\203\252 \344\202\253 \345\262\325\211\211\211\346\235\204\350 \347\235\203\315 \314!\262\350_\262\202\331 \314!\262\351\350\"\262\351\350\"\262\352\353\350\246#\262\354\206\357 \355B\356\n@\206\370 \355B\357A\206\355B\360\361\230\203\355\202B\362	\206\355B\363	\203&\364\n!\202'\355B\365	\2035\364\n!\2026\355B\366	\203D\364\n!\202E\355B\367	\206M\355B\257	\207" [split-string battery--call-process-to-string "uname" #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("OpenBSD" 12 "FreeBSD" 16)) "mP" "st" "ms" "-abl" "apm" "FreeBSD" ((ac . 0) (battery-status . 1) (battery-percent . 2) (apm-mode . 3) (battery-life . 4)) ((ac . 3) (battery-status . 0) (battery-percent . 1) (apm-mode . 4) (battery-life . 2)) string-to-number alist-get battery-status #s(hash-table size 5 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (0 55 1 59 2 63 3 67 4 71)) ("high" . "") ("low" . "-") ("critical" . "!") ("charging" . "+") ("absent") nil battery-percent battery-life ac #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (0 106 1 110 2 114)) "disconnected" "connected" "backup power" apm-mode "OpenBSD" #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (0 144 1 148 2 152)) "manual" "automatic" "cool running" 1 "on" "off" ("unknown" "-1") ("OpenBSD" "NetBSD") 60 truncate format "%d:%02d" 76 "N/A" 66 98 112 "255" 80 115 number-to-string 109 104 116] 24 (#$ . 32644)])#@436 Get battery status information using `pmset'.

The following %-sequences are provided:
%L Power source (verbose)
%B Battery status (verbose)
%b Battery status, empty means high, `-' means low,
   `!' means critical, and `+' means charging
%p Battery load percentage
%m Remaining time (to charge or discharge) in minutes
%h Remaining time (to charge or discharge) in hours
%t Remaining time (to charge or discharge) in the form `h:min'
(defalias 'battery-pmset #[0 "\302\211\211\211\211\211\211\303\304\305\"r\211q\210\306\307\"\216\3101& \311\312\302\305\302\313\314&0\210\202' \210eb\210\315\316\302\305#\203\276 \317\320!\262\315\321\302\305#\203\276 \322\323!\203\276 \317\320!\262\324\225b\210\325\322\305\"\262\203a \326\262\327\262\202\213 \330!W\203s \331\262\332\262\202\213 \330!	W\203\205 \333\262\334\262\202\213 \335\262\336\262\315\337\302\305#\203\276 \317\320!\262\330\317\340!!\330\317\341!!\342\343W\203\256 \324\202\257 \320\\!\262\342\344_\\!\262\266*\210\345\206\307 \346B\347\206\317 \346B\350\206\327 \346B\351\206\337 \336B\352\206\347 \346B\353\206\357 \346B\354	\206\367 \346B\257\207" [battery-load-critical battery-load-low nil generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205	 \302\300!\207" [V0 buffer-name kill-buffer] 2] (error) call-process "pmset" "-g" "ps" re-search-forward "\\(?:Currentl?y\\|Now\\) drawing from '\\(AC\\|Battery\\) Power'" match-string 1 "^ -InternalBattery-0[[:space:]]+\\(?:(id=[[:digit:]]+)[[:space:]]+\\)*" looking-at "\\([0-9]\\{1,3\\}\\)%" 0 "; charging" "charging" "+" string-to-number "critical" "!" "low" "-" "high" "" "\\(\\([0-9]+\\):\\([0-9]+\\)\\) remaining" 2 3 number-to-string 30 60 76 "N/A" 112 66 98 104 109 116] 15 (#$ . 35185)])#@54 Substitute %-sequences in FORMAT.

(fn FORMAT ALIST)
(defalias 'battery-format #[514 "\300\301#\207" [format-spec delete] 6 (#$ . 36948)])#@206 Search REGEXP in the content of the files listed in FILES.
If a match occurred, return the parenthesized expression numbered by
MATCH-NUM in the match.  Otherwise, return nil.

(fn FILES REGEXP MATCH-NUM)
(defalias 'battery-search-for-one-match-in-files #[771 "\300\301\302\"r\211q\210\303\304\"\216\3052H \211\205E \211@\3061' \307\310\211\211\311%0\202+ \210\202> \203> \312\310\302#\203> \313\305\314!\"\210A\266\202\202 \2620*\207" [generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205	 \302\300!\207" [V0 buffer-name kill-buffer] 2] found (error) insert-file-contents nil replace re-search-forward throw match-string] 12 (#$ . 37095)])
(provide 'battery)
