| 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 : |
;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=\205g o?*\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\203N W\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&