diff --git a/battery.c b/battery.c index 2b2fc83..dc52643 100644 --- a/battery.c +++ b/battery.c @@ -16,10 +16,13 @@ // }; const char *icon[] = { - "󰂎", /* 0% */ + "󰂎", /* 0% */ "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", /* 50% */ "󰁿", "󰂀", "󰂁", "󰂂", "󰁹", /* 100% */ }; +const char charging[] = "󰂄"; +const char disconnected[] = "-"; +const char unknown[] = "󰂑"; typedef enum { CHARGED = 0, @@ -29,7 +32,7 @@ typedef enum { UNKNOWN = -1 } State; -const char separator[] = " "; // space between battery indicators +const char separator[] = " "; // space between battery indicators void battery_state(int *nbats, int bat[], State state[]) { #if defined(__linux__) @@ -108,13 +111,13 @@ int main() { life[i]); break; case CHARGING: /* charging */ - printf("#[fg=yellow]\uf583#[fg=default] %d%%", life[i]); + printf("#[fg=yellow]%s#[fg=default] %d%%", charging, life[i]); break; case DISCONNECTED: /* disconnected */ - printf("\uf492"); + printf("%s", disconnected); break; default: /* unknown code */ - printf("\uf590"); + printf("%s", unknown); } } -- libgit2 0.21.2