Allow numeric colors in bmonrc

This commit is contained in:
Alexis Hildebrandt 2017-10-02 21:01:18 +02:00 committed by Thomas Graf
parent fdd139ada2
commit b44d0152c4

View File

@ -28,6 +28,8 @@ static int parse_color(const char* color)
color_code = COLOR_MAGENTA; color_code = COLOR_MAGENTA;
else if ((strcasestr(color, "cyan") != NULL)) else if ((strcasestr(color, "cyan") != NULL))
color_code = COLOR_CYAN; color_code = COLOR_CYAN;
else if ((atoi(color) >= 0))
color_code = atoi(color);
return color_code; return color_code;
} }