Make i3bar get its config from i3 via IPC
In order to not duplicate configuration options and make stuff confusing, we dropped the commandline flags (except for socket_path and bar_id). This means that you *have to* specify bar_id when starting i3bar. The best way is to let i3 start i3bar, which it will do automatically for every bar {} configuration block it finds.
This commit is contained in:
@ -13,10 +13,25 @@ typedef struct config_t {
|
||||
int hide_on_modifier;
|
||||
dockpos_t dockpos;
|
||||
int verbose;
|
||||
xcb_colors_t *colors;
|
||||
struct xcb_color_strings_t colors;
|
||||
int disable_ws;
|
||||
char *bar_id;
|
||||
char *command;
|
||||
char *fontname;
|
||||
} config_t;
|
||||
|
||||
config_t config;
|
||||
|
||||
/**
|
||||
* Start parsing the received bar configuration json-string
|
||||
*
|
||||
*/
|
||||
void parse_config_json(char *json);
|
||||
|
||||
/**
|
||||
* free()s the color strings as soon as they are not needed anymore.
|
||||
*
|
||||
*/
|
||||
void free_colors(struct xcb_color_strings_t *colors);
|
||||
|
||||
#endif
|
||||
|
@ -40,10 +40,18 @@ struct xcb_color_strings_t {
|
||||
typedef struct xcb_colors_t xcb_colors_t;
|
||||
|
||||
/*
|
||||
* Initialize xcb and use the specified fontname for text-rendering
|
||||
* Early initialization of the connection to X11: Everything which does not
|
||||
* depend on 'config'.
|
||||
*
|
||||
*/
|
||||
char *init_xcb(char *fontname);
|
||||
char *init_xcb_early();
|
||||
|
||||
/**
|
||||
* Initialization which depends on 'config' being usable. Called after the
|
||||
* configuration has arrived.
|
||||
*
|
||||
*/
|
||||
void init_xcb_late(char *fontname);
|
||||
|
||||
/*
|
||||
* Initialize the colors
|
||||
|
Reference in New Issue
Block a user