Use a more efficient struct for storing colors, validate/parse them more easily

This commit is contained in:
Michael Stapelberg
2009-05-30 22:20:32 +02:00
parent 65bcf170ed
commit cbc3880007
3 changed files with 67 additions and 79 deletions

View File

@ -4,24 +4,26 @@
typedef struct Config Config;
extern Config config;
struct Colortriple {
char border[8];
char background[8];
char text[8];
};
struct Config {
const char *terminal;
const char *font;
/* Color codes are stored here */
char *client_focused_background_active;
char *client_focused_background_inactive;
char *client_focused_text;
char *client_focused_border;
char *client_unfocused_background;
char *client_unfocused_text;
char *client_unfocused_border;
char *bar_focused_background;
char *bar_focused_text;
char *bar_focused_border;
char *bar_unfocused_background;
char *bar_unfocused_text;
char *bar_unfocused_border;
struct config_client {
struct Colortriple focused;
struct Colortriple focused_inactive;
struct Colortriple unfocused;
} client;
struct config_bar {
struct Colortriple focused;
struct Colortriple unfocused;
} bar;
};
/**