diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-03-30 00:11:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-30 00:11:00 -0400 |
commit | 9d7f47746cdcb0eed3cf41875d06a8ef238eef1c (patch) | |
tree | 997658454de40db3f8b76b68d658efaf2b686188 /include/swaybar/config.h | |
parent | 7162b9bea4d66d61376ad3605e23e2d83bb95201 (diff) | |
parent | f26ecd9f58bb672fe107660ce9b37f4bf0777a8c (diff) |
Merge pull request #1648 from swaywm/swaybar-layers
Port swaybar to layer shell
Diffstat (limited to 'include/swaybar/config.h')
-rw-r--r-- | include/swaybar/config.h | 60 |
1 files changed, 15 insertions, 45 deletions
diff --git a/include/swaybar/config.h b/include/swaybar/config.h index 651f0ee3..7634cb16 100644 --- a/include/swaybar/config.h +++ b/include/swaybar/config.h @@ -1,49 +1,35 @@ #ifndef _SWAYBAR_CONFIG_H #define _SWAYBAR_CONFIG_H - -#include <stdint.h> #include <stdbool.h> - -#include "list.h" +#include <stdint.h> +#include <wayland-client.h> #include "util.h" -/** - * Colors for a box with background, border and text colors. - */ struct box_colors { uint32_t border; uint32_t background; uint32_t text; }; -/** - * Swaybar config. - */ -struct config { +struct config_output { + struct wl_list link; + char *name; + size_t index; +}; + +struct swaybar_config { char *status_command; bool pango_markup; - uint32_t position; + uint32_t position; // zwlr_layer_surface_v1_anchor char *font; char *sep_symbol; char *mode; + bool mode_pango_markup; bool strip_workspace_numbers; bool binding_mode_indicator; bool wrap_scroll; bool workspace_buttons; - bool all_outputs; - list_t *outputs; - -#ifdef ENABLE_TRAY - // Tray - char *tray_output; - char *icon_theme; - - uint32_t tray_padding; - uint32_t activate_button; - uint32_t context_button; - uint32_t secondary_button; -#endif - + struct wl_list outputs; int height; struct { @@ -63,24 +49,8 @@ struct config { } colors; }; -/** - * Parse position top|bottom|left|right. - */ +struct swaybar_config *init_config(); +void free_config(struct swaybar_config *config); uint32_t parse_position(const char *position); -/** - * Parse font. - */ -char *parse_font(const char *font); - -/** - * Initialize default sway config. - */ -struct config *init_config(); - -/** - * Free config struct. - */ -void free_config(struct config *config); - -#endif /* _SWAYBAR_CONFIG_H */ +#endif |