diff --git a/config/ui.org b/config/ui.org index ec2860c..07dd0ea 100644 --- a/config/ui.org +++ b/config/ui.org @@ -231,9 +231,12 @@ Removed in favour of [[https://github.com/catppuccin/emacs][Catppuccin (emacs)]] #+end_src ** Battery state for laptops #+begin_src emacs-lisp - (with-eval-after-load 'battery - (when (battery-upower) - (display-battery-mode +1))) + (require 'battery) + (when (and battery-status-function + (not ( string-match-p "unknown" + ( battery-format "%B" + (funcall battery-status-function))))) + (display-battery-mode +1)) #+end_src * Dashboard #+begin_src emacs-lisp