diff --git a/init.el b/init.el index 4bb62c6..f7d1c43 100644 --- a/init.el +++ b/init.el @@ -979,15 +979,15 @@ (cd "~/"))) (defvar my-ac-previous-status t - "Whether battery was not in use on last check.") + "Whether connected to AC during last check.") (require 'battery) (defun my-bat-check () "Check if battery status has changed. Used to toggle `goggles-pulse', `pixel-scroll-precision-mode', and `nyan-mode'." (let ((ac-status (not (string= - (cdr (assq ?L (funcall battery-status-function))) - "BAT")))) + (cdr (assq ?B (funcall battery-status-function))) + "discharging")))) (unless (eq ac-status my-ac-previous-status) (setq my-ac-previous-status ac-status) (when (boundp 'goggles-pulse)