From 57430f93bc7ed38893d6cc36969902f3ad9a98d1 Mon Sep 17 00:00:00 2001 From: TEC Date: Mon, 10 May 2021 22:49:01 +0800 Subject: [PATCH] Fix the logic for battery display, more caching --- config.org | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/config.org b/config.org index f98a557..9d56fa9 100644 --- a/config.org +++ b/config.org @@ -343,14 +343,13 @@ the following: (setq undo-limit 80000000 ; Raise undo-limit to 80Mb evil-want-fine-undo t ; By default while in insert all changes are one big blob. Be more granular auto-save-default t ; Nobody likes to loose work, I certainly don't - truncate-string-ellipsis "…") ; Unicode ellispis are nicer than "...", and also save /precious/ space + truncate-string-ellipsis "…" ; Unicode ellispis are nicer than "...", and also save /precious/ space + password-cache-expiry nil) ; I can trust my computers ... can't I? (display-time-mode 1) ; Enable time in the mode-line -(if (equal "Battery status not available" - (battery)) - (display-battery-mode 1) ; On laptops it's nice to know how much power you have - (setq password-cache-expiry nil)) ; I can trust my desktops ... can't I? (no battery = desktop) +(unless (string-match-p "^Power N/A" (battery)) ; On laptops... + (display-battery-mode 1)) ; it's nice to know how much power you have (global-subword-mode 1) ; Iterate through CamelCase words #+end_src