Commit cb150c6ad493c120f5e8763aa8eb2c024947c485

Authored by Miguel Barão
1 parent 407581b9
Exists in master

fix icons

Showing 1 changed file with 8 additions and 5 deletions   Show diff stats
@@ -16,10 +16,13 @@ @@ -16,10 +16,13 @@
16 // }; 16 // };
17 17
18 const char *icon[] = { 18 const char *icon[] = {
19 - "󰂎", /* 0% */ 19 + "󰂎", /* 0% */
20 "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", /* 50% */ 20 "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", /* 50% */
21 "󰁿", "󰂀", "󰂁", "󰂂", "󰁹", /* 100% */ 21 "󰁿", "󰂀", "󰂁", "󰂂", "󰁹", /* 100% */
22 }; 22 };
  23 +const char charging[] = "󰂄";
  24 +const char disconnected[] = "-";
  25 +const char unknown[] = "󰂑";
23 26
24 typedef enum { 27 typedef enum {
25 CHARGED = 0, 28 CHARGED = 0,
@@ -29,7 +32,7 @@ typedef enum { @@ -29,7 +32,7 @@ typedef enum {
29 UNKNOWN = -1 32 UNKNOWN = -1
30 } State; 33 } State;
31 34
32 -const char separator[] = " "; // space between battery indicators 35 +const char separator[] = " "; // space between battery indicators
33 36
34 void battery_state(int *nbats, int bat[], State state[]) { 37 void battery_state(int *nbats, int bat[], State state[]) {
35 #if defined(__linux__) 38 #if defined(__linux__)
@@ -108,13 +111,13 @@ int main() { @@ -108,13 +111,13 @@ int main() {
108 life[i]); 111 life[i]);
109 break; 112 break;
110 case CHARGING: /* charging */ 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 break; 115 break;
113 case DISCONNECTED: /* disconnected */ 116 case DISCONNECTED: /* disconnected */
114 - printf("\uf492"); 117 + printf("%s", disconnected);
115 break; 118 break;
116 default: /* unknown code */ 119 default: /* unknown code */
117 - printf("\uf590"); 120 + printf("%s", unknown);
118 } 121 }
119 } 122 }
120 123