This commit is contained in:
calvinkosmatka 2017-06-12 22:09:16 +00:00 committed by GitHub
commit 4ba22e2bbd
17 changed files with 217 additions and 40 deletions

View file

@ -110,7 +110,7 @@ struct bar_config {
* Always visible in dock mode. Visible only when modifier key is held in hide mode.
* Never visible in invisible mode.
*/
char *mode;
char *display_mode;
/**
* One of "show" or "hide".
*
@ -225,9 +225,10 @@ enum ipc_feature {
IPC_FEATURE_EVENT_WINDOW = 2048,
IPC_FEATURE_EVENT_BINDING = 4096,
IPC_FEATURE_EVENT_INPUT = 8192,
IPC_FEATURE_EVENT_MODIFIER = 16384,
IPC_FEATURE_ALL_COMMANDS = 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128,
IPC_FEATURE_ALL_EVENTS = 256 | 512 | 1024 | 2048 | 4096 | 8192,
IPC_FEATURE_ALL_EVENTS = 256 | 512 | 1024 | 2048 | 4096 | 8192 | 16384,
IPC_FEATURE_ALL = IPC_FEATURE_ALL_COMMANDS | IPC_FEATURE_ALL_EVENTS,
};

View file

@ -27,6 +27,9 @@ struct panel_config {
struct wl_client *client;
// wlc handle for this panel's surface, not set until panel is created
wlc_handle handle;
enum desktop_shell_hide_modes hide_mode;
enum desktop_shell_hide_state hide;
};
struct desktop_shell_state {

View file

@ -16,6 +16,17 @@ struct box_colors {
uint32_t text;
};
enum display_mode_types {
MODE_HIDE,
MODE_DOCK,
MODE_INVISIBLE
};
enum hidden_states {
BAR_HIDDEN,
BAR_SHOW
};
/**
* Swaybar config.
*/
@ -26,6 +37,8 @@ struct config {
char *font;
char *sep_symbol;
char *mode;
enum display_mode_types display_mode;
enum hidden_states hidden_state;
bool strip_workspace_numbers;
bool binding_mode_indicator;
bool wrap_scroll;
@ -62,6 +75,16 @@ uint32_t parse_position(const char *position);
*/
char *parse_font(const char *font);
/**
* Parse display mode dock|hide|invisible.
*/
enum display_mode_types parse_display_mode(const char *display_mode);
/**
* Parse hidden state show|hide.
*/
enum hidden_states parse_hidden_state(const char *hidden_state);
/**
* Initialize default sway config.
*/