[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/minibar f228469970 06/17: Use char-displayable-p instead o
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/minibar f228469970 06/17: Use char-displayable-p instead of display-graphic-p |
Date: |
Sun, 27 Nov 2022 16:01:37 -0500 (EST) |
branch: elpa/minibar
commit f228469970965d50c6f6a12f1015fa4a4f319fa3
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>
Use char-displayable-p instead of display-graphic-p
---
minibar.el | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/minibar.el b/minibar.el
index 26cf9d354b..05cc9b69a0 100644
--- a/minibar.el
+++ b/minibar.el
@@ -422,7 +422,13 @@ it was recorded.")
(format
"%3i%%%s"
(minibar--module-cpu-calculate-load "cpu")
- (if (display-graphic-p)
+ (if (and (char-displayable-p ?█) ;; #x2588
+ (char-displayable-p ?▇) ;; #x2587
+ (char-displayable-p ?▆) ;; #x2586
+ (char-displayable-p ?▅) ;; #x2585
+ (char-displayable-p ?▄) ;; #x2584
+ (char-displayable-p ?▃) ;; #x2583
+ (char-displayable-p ?▂)) ;; #x2582
(concat
" "
(mapconcat
@@ -431,19 +437,19 @@ it was recorded.")
(format "cpu%i" i))))
(cond
((>= load 87.5)
- (propertize (string #x2588) 'face 'bold))
+ (propertize "█" 'face 'bold))
((>= load 75)
- (propertize (string #x2587) 'face 'bold))
+ (propertize "▇" 'face 'bold))
((>= load 62.5)
- (propertize (string #x2586) 'face 'bold))
+ (propertize "▆" 'face 'bold))
((>= load 50)
- (propertize (string #x2585) 'face 'bold))
+ (propertize "▅" 'face 'bold))
((>= load 37.5)
- (propertize (string #x2584) 'face 'bold))
+ (propertize "▄" 'face 'bold))
((>= load 25)
- (propertize (string #x2583) 'face 'bold))
+ (propertize "▃" 'face 'bold))
((>= load 12.5)
- (propertize (string #x2582) 'face 'bold))
+ (propertize "▂" 'face 'bold))
(t
(propertize
(string #x2581) 'face
- [nongnu] elpa/minibar c995aec574 01/17: Add render and modules for time, CPU, temperature..., (continued)
- [nongnu] elpa/minibar c995aec574 01/17: Add render and modules for time, CPU, temperature..., ELPA Syncer, 2022/11/27
- [nongnu] elpa/minibar 2bf88ae60a 05/17: While updating, don't exit on input, that doesn't work on Emacs 28, ELPA Syncer, 2022/11/27
- [nongnu] elpa/minibar 2c50c766dd 07/17: Rename minibar--update to minibar-update, ELPA Syncer, 2022/11/27
- [nongnu] elpa/minibar 5e8afde8f7 13/17: Don't run module functions in temp buffer, ELPA Syncer, 2022/11/27
- [nongnu] elpa/minibar 1da37a9286 12/17: Update install instructions, ELPA Syncer, 2022/11/27
- [nongnu] elpa/minibar 46f3307cc9 10/17: Fix wrong argument order, ELPA Syncer, 2022/11/27
- [nongnu] elpa/minibar 8775f1584c 09/17: Use idle timer, ELPA Syncer, 2022/11/27
- [nongnu] elpa/minibar 9d650e3c71 14/17: Fix group positioning in minibuffer, ELPA Syncer, 2022/11/27
- [nongnu] elpa/minibar 3913de72e0 15/17: Try to make all lines less than 75 characters width, ELPA Syncer, 2022/11/27
- [nongnu] elpa/minibar 9d1a459684 04/17: Don't depend on minibuffer-line, ELPA Syncer, 2022/11/27
- [nongnu] elpa/minibar f228469970 06/17: Use char-displayable-p instead of display-graphic-p,
ELPA Syncer <=
- [nongnu] elpa/minibar 0b02619c7f 11/17: Don't stop updating after first update after idle, ELPA Syncer, 2022/11/27
- [nongnu] elpa/minibar 45824cb137 17/17: Simplify character choosing logic in CPU module, ELPA Syncer, 2022/11/27
- [nongnu] elpa/minibar 37699eb25e 08/17: Don't use undocumented data in battery module, ELPA Syncer, 2022/11/27
- [nongnu] elpa/minibar 15896aa33a 16/17: Add .dir-locals.el, ELPA Syncer, 2022/11/27