403Webshell
Server IP : 217.160.0.212  /  Your IP : 216.73.216.141
Web Server : Apache
System : Linux www 6.18.51-i1-ampere #1196 SMP Fri Sep 11 20:43:55 CEST 2026 aarch64
User : sws1073854427 ( 1073854427)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/share/emacs/28.2/lisp/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/emacs/28.2/lisp/battery.elc
;ELC
;;; Compiled
;;; in Emacs version 28.2
;;; 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" (#$ . 1797))
#@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 (#$ . 1981)])
#@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\211B\262A\266\202\202\210\211\237\207" [nil battery--files "/sys/class/power_supply/" file-exists-p expand-file-name "capacity"] 7 (#$ . 2248)])
(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 \203\306\207	\304=\203$\307\310!\203$\311\207	\304=\2032\312\313!\2032\314\207	\315=\203@\316\317!\203@\320\207	\321=\203u\3221n\323\324\325\"r\211q\210\326\327\"\216\330\331\332\325\332\333\334&\335=\205go?*\2620\202p\210\332\203u\336\207\337\340!\205|\340\207" [battery-upower-service system-type dbus-list-activatable-names battery-upower gnu/linux battery--find-linux-sysfs-batteries battery-linux-sysfs file-directory-p "/proc/acpi/battery" battery-linux-proc-acpi file-readable-p "/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 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 (#$ . 5069))
(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%\210\331\323\332\333\306\334%\210\331\326\335\336\306\334%\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." custom-declare-face ((t :inherit warning)) "Face used in mode line string when battery load is low.\nSee the option `battery-load-low'." "28.1" ((t :inherit error)) "Face used in mode line string when battery load is critical.\nSee the option `battery-load-critical'."] 8)
#@24 Interval timer object.
(defvar battery-update-timer nil (#$ . 7509))
#@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 (#$ . 7585) nil])
(byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313&	\207" [custom-declare-variable display-battery-mode funcall function #[0 "\300\207" [nil] 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 :type boolean] 10)
#@833 Toggle battery status display in mode line (Display Battery mode).

This is a 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.

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.

(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\310B\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\275\342\310!\210\306 \203\255\211\306 \232\203\275\332\343\312\310!\203\271\344\202\272\345\320#\210\210\346 \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 "Display-Battery mode %sabled%s" "en" "dis" force-mode-line-update battery-upower-subscribe battery-update-interval] 6 (#$ . 8510) (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\203NW\203?\312\311\303\313%\210\202N\fW\203N\312\311\304\313%\210\314\311\315\316%\210\206\\\317\266\320\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" "" force-mode-line-update] 10 (#$ . 11324)])
(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:]]+\\) \\(.*\\)$" (#$ . 12235))
(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\n\313\314!\262
\313\315!\262\f\316\313\317!\320\"\262\321\315\"\204M\322\262\202\n\323\262\321\320\"\203]\324\262\202g\321\325\"\203g\326\262\316\313\327!\320\"\262\330U\203{\331\262\n\202\220\314U\203\207\332\262\n\202\220\315U\203\220\333\262\n\316\313\334!\320\"\335U\204\n\316\313\336!\320\"\262\330U\203\262\337\262	\340\262\202\334\314U\203\301\341\262	\342\262\202\334\315U\203\320\343\262	\344\262\202\334\317U\203\334\345\262	\346\262\313\347!\262\316\313\350!!\262\313\351!\352\230\203\366\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\206+\360B\364\f\2063\360B\365\f\206;\340B\366\f\206C\360B\367\f\203Q\370
!\202R\360B\371\f\203`\370
!\202a\360B\372\f\203o\370
!\202p\360B\373\f\206x\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 "not supported" "enabled" "disabled" 32 "disengaged" 4 0 "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 (#$ . 12604)])
(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\nA\266\202\202\210*\210	\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\311W\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 (#$ . 15185)])
#@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\262eb\210\317\325\304\307#\2039eb\210\317\326\304\307#\203k\327\235\203k\322\323!\262eb\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!\262eb\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\202eb\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\210A\266\202\202\210*\210\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\375W\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\262B\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 (#$ . 18543)])
#@96 Name of the UPower D-Bus interface.
See URL `https://upower.freedesktop.org/docs/UPower.html'.
(defconst battery-upower-interface "org.freedesktop.UPower" (#$ . 21776))
#@52 D-Bus object providing `battery-upower-interface'.
(defconst battery-upower-path "/org/freedesktop/UPower" (#$ . 21951))
#@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" (#$ . 22079))
#@59 D-Bus object providing `battery-upower-device-interface'.
(defconst battery-upower-device-path "/org/freedesktop/UPower/devices" (#$ . 22275))
#@42 Handles for UPower signal subscriptions.
(defvar battery--upower-signals nil (#$ . 22424))
#@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 (#$ . 22521)])
#@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 (#$ . 22721)])
#@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 (#$ . 23021)])
#@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&BA\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 (#$ . 23223)])
#@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 (#$ . 23681)])
#@63 List all UPower devices according to `battery-upower-device'.
(defalias 'battery--upower-devices #[0 ";\203C\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 (#$ . 23993)])
#@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\311D\"\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 (#$ . 24388)])
#@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\334T\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	\266A\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 (#$ . 25203)])
#@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\307P\300\301!!\310\232\203'\311\202(\312\313\314\315\"8!\211\316\267\202J\317\202K\320\202K\321\202K\322\202K\323\202K\324\262\314\325\"8\314\326\"8\313\314\327\"8!\211\330\267\202u\331\202v\332\202v\333\202v\324\262\313\314\334\"8!	\335\230\203\237\211\336\267\202\233\337\202\252\340\202\252\341\202\252\324\202\252\211\342=\203\251\343\202\252\344\262\324\211\211\211\345\235\204\347
\346\235\203\314\313!\262\347_\262\202\330\313!\262\350\347\"\262\350\347\"\262\351\352\347\246#\262\353\206\356\354B\355\n@\206\367\354B\356A\206\354B\357\360\230\203
\354\202B\361	\206\354B\362	\203%\363\n!\202&\354B\364	\2034\363\n!\2025\354B\365	\203C\363\n!\202D\354B\366	\206L\354B\257	\207" [split-string shell-command-to-string "/usr/bin/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" "/usr/sbin/apm -abl" "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 54 1 58 2 62 3 66 4 70)) ("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 105 1 109 2 113)) "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 143 1 147 2 151)) "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 (#$ . 27543)])
#@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 "\303\211\211\211\211\211\211\304\305\306\"r\211q\210\307\310\"\216\3111&\312\313\303\306\303\314\315&0\210\202'\210eb\210\316\317\303\306#\203\300\320\321!\262\316\322\303\306#\203\300\323\324!\203\300\320\321!\262\325\225b\210\326\306\323!)\262\203c\327\262\330\262\202\215\331!	W\203u\332\262\333\262\202\215\331!\nW\203\207\334\262\335\262\202\215\336\262\337\262\316\340\303\306#\203\300\320\321!\262\331\320\341!!\331\320\342!!\343\344W\203\260\325\202\261\321\\!\262\343\345_\\!\262\266*\210\346\206\311\347B\350\206\321\347B\351\206\331\347B\352\206\341\337B\353\206\351\347B\354\206\361\347B\355	\206\371\347B\257\207" [inhibit-changing-match-data 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 (#$ . 30089)])
#@54 Substitute %-sequences in FORMAT.

(fn FORMAT ALIST)
(defalias 'battery-format #[514 "\300\301#\207" [format-spec delete] 6 (#$ . 31883)])
#@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!\"\210A\266\202\202\2620*\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 (#$ . 32031)])
(provide 'battery)

Youez - 2016 - github.com/yon3zu
LinuXploit