Improve (hopefully) check for battery before displaying in modeline
This commit is contained in:
parent
3a70aa9cd9
commit
3a9f4294cf
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue