Commit cb150c6ad493c120f5e8763aa8eb2c024947c485
1 parent
407581b9
Exists in
master
fix icons
Showing
1 changed file
with
8 additions
and
5 deletions
Show diff stats
battery.c
... | ... | @@ -16,10 +16,13 @@ |
16 | 16 | // }; |
17 | 17 | |
18 | 18 | const char *icon[] = { |
19 | - "", /* 0% */ | |
19 | + "", /* 0% */ | |
20 | 20 | "", "", "", "", "", /* 50% */ |
21 | 21 | "", "", "", "", "", /* 100% */ |
22 | 22 | }; |
23 | +const char charging[] = ""; | |
24 | +const char disconnected[] = "-"; | |
25 | +const char unknown[] = ""; | |
23 | 26 | |
24 | 27 | typedef enum { |
25 | 28 | CHARGED = 0, |
... | ... | @@ -29,7 +32,7 @@ typedef enum { |
29 | 32 | UNKNOWN = -1 |
30 | 33 | } State; |
31 | 34 | |
32 | -const char separator[] = " "; // space between battery indicators | |
35 | +const char separator[] = " "; // space between battery indicators | |
33 | 36 | |
34 | 37 | void battery_state(int *nbats, int bat[], State state[]) { |
35 | 38 | #if defined(__linux__) |
... | ... | @@ -108,13 +111,13 @@ int main() { |
108 | 111 | life[i]); |
109 | 112 | break; |
110 | 113 | case CHARGING: /* charging */ |
111 | - printf("#[fg=yellow]\uf583#[fg=default] %d%%", life[i]); | |
114 | + printf("#[fg=yellow]%s#[fg=default] %d%%", charging, life[i]); | |
112 | 115 | break; |
113 | 116 | case DISCONNECTED: /* disconnected */ |
114 | - printf("\uf492"); | |
117 | + printf("%s", disconnected); | |
115 | 118 | break; |
116 | 119 | default: /* unknown code */ |
117 | - printf("\uf590"); | |
120 | + printf("%s", unknown); | |
118 | 121 | } |
119 | 122 | } |
120 | 123 | ... | ... |