From a31fef36ff03a057a743fdc1c2d234270137caa0 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Thu, 19 Sep 2024 12:14:57 -0400 Subject: Get b-bar battery from GNU Emacs if available --- .emacs.d/init.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.emacs.d') diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 0c35928..97f515e 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -215,9 +215,10 @@ plain variables. This means that `setopt' will execute any (unless (display-graphic-p) (display-time-mode))) +(defvar b/battery-format "%p%b %t") (run-with-idle-timer 0.1 nil #'require 'battery) (with-eval-after-load 'battery - (setopt battery-mode-line-format " [%b%p%% %t]") + (setopt battery-mode-line-format (format " [%s]" b/battery-format)) (display-battery-mode)) (run-with-idle-timer 0.5 nil #'require 'winner) -- cgit v1.2.3-83-g751a