From b7a86988ad020ba56db76e544e1163213bda1bea Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Mon, 24 Jun 2024 06:36:59 +0100 Subject: [PATCH] Revert "Remove display-battery-mode" This reverts commit 418e88356e362fde58a752f0012019267b84e665. --- init.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/init.el b/init.el index cab8676..18b73c5 100644 --- a/init.el +++ b/init.el @@ -307,8 +307,15 @@ (line-number-mode -1) (column-number-mode -1) (size-indication-mode +1) -(display-time-mode -1) -(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)) + +(display-time-mode +1) (use-package diff-hl :functions (diff-hl-magit-pre-refresh