aboutsummaryrefslogtreecommitdiff
path: root/include/swaybar/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/swaybar/config.h')
-rw-r--r--include/swaybar/config.h60
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