7098ef602b
i3 current behavior hides the binding mode indicator when workspace buttons are disabled. This patch adds a new configuration for i3bar called 'binding_mode_indicator' which acts like the workspace_buttons. It is now possible to configure i3bar to hide the workspace buttons and keep showing the binding mode indicator. This should make the hide workspace buttons configuration more convenient for those who are heavily using binding modes. Default value for binding_mode_indicator is true.
57 lines
1.3 KiB
C
57 lines
1.3 KiB
C
/*
|
|
* vim:ts=4:sw=4:expandtab
|
|
*
|
|
* i3bar - an xcb-based status- and ws-bar for i3
|
|
* © 2010-2011 Axel Wagner and contributors (see also: LICENSE)
|
|
*
|
|
* config.c: Parses the configuration (received from i3).
|
|
*
|
|
*/
|
|
#ifndef CONFIG_H_
|
|
#define CONFIG_H_
|
|
|
|
#include "common.h"
|
|
|
|
typedef enum {
|
|
POS_NONE = 0,
|
|
POS_TOP,
|
|
POS_BOT
|
|
} position_t;
|
|
|
|
typedef struct config_t {
|
|
int modifier;
|
|
position_t position;
|
|
int verbose;
|
|
struct xcb_color_strings_t colors;
|
|
bool disable_binding_mode_indicator;
|
|
bool disable_ws;
|
|
char *bar_id;
|
|
char *command;
|
|
char *fontname;
|
|
char *tray_output;
|
|
int num_outputs;
|
|
char **outputs;
|
|
|
|
/* Bar display mode (hide unless modifier is pressed or show in dock mode or always hide in invisible mode) */
|
|
enum { M_DOCK = 0, M_HIDE = 1, M_INVISIBLE = 2 } hide_on_modifier;
|
|
|
|
/* The current hidden_state of the bar, which indicates whether it is hidden or shown */
|
|
enum { S_HIDE = 0, S_SHOW = 1 } hidden_state;
|
|
} 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
|