From db0995ea1f8ede9c4cc1b1c35b7acb8603134a15 Mon Sep 17 00:00:00 2001 From: eriedaberrie Date: Tue, 23 Apr 2024 00:43:11 -0700 Subject: [PATCH] Make battery checker check more standardized values --- init.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)