aboutsummaryrefslogtreecommitdiffstats
path: root/include/swaybar/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/swaybar/config.h')
-rw-r--r--include/swaybar/config.h59
1 files changed, 15 insertions, 44 deletions
diff --git a/include/swaybar/config.h b/include/swaybar/config.h
index 651f0ee3..7f321df8 100644
--- a/include/swaybar/config.h
+++ b/include/swaybar/config.h
@@ -1,49 +1,36 @@
1#ifndef _SWAYBAR_CONFIG_H 1#ifndef _SWAYBAR_CONFIG_H
2#define _SWAYBAR_CONFIG_H 2#define _SWAYBAR_CONFIG_H
3
4#include <stdint.h>
5#include <stdbool.h> 3#include <stdbool.h>
6 4#include <stdint.h>
7#include "list.h" 5#include <wayland-client.h>
8#include "util.h" 6#include "util.h"
9 7
10/**
11 * Colors for a box with background, border and text colors.
12 */
13struct box_colors { 8struct box_colors {
14 uint32_t border; 9 uint32_t border;
15 uint32_t background; 10 uint32_t background;
16 uint32_t text; 11 uint32_t text;
17}; 12};
18 13
19/** 14struct config_output {
20 * Swaybar config. 15 struct wl_list link;
21 */ 16 char *name;
22struct config { 17 size_t index;
18};
19
20struct swaybar_config {
23 char *status_command; 21 char *status_command;
24 bool pango_markup; 22 bool pango_markup;
25 uint32_t position; 23 uint32_t position; // zwlr_layer_surface_v1_anchor
26 char *font; 24 char *font;
27 char *sep_symbol; 25 char *sep_symbol;
28 char *mode; 26 char *mode;
27 bool mode_pango_markup;
29 bool strip_workspace_numbers; 28 bool strip_workspace_numbers;
30 bool binding_mode_indicator; 29 bool binding_mode_indicator;
31 bool wrap_scroll; 30 bool wrap_scroll;
32 bool workspace_buttons; 31 bool workspace_buttons;
32 struct wl_list outputs;
33 bool all_outputs; 33 bool all_outputs;
34 list_t *outputs;
35
36#ifdef ENABLE_TRAY
37 // Tray
38 char *tray_output;
39 char *icon_theme;
40
41 uint32_t tray_padding;
42 uint32_t activate_button;
43 uint32_t context_button;
44 uint32_t secondary_button;
45#endif
46
47 int height; 34 int height;
48 35
49 struct { 36 struct {
@@ -63,24 +50,8 @@ struct config {
63 } colors; 50 } colors;
64}; 51};
65 52
66/** 53struct swaybar_config *init_config();
67 * Parse position top|bottom|left|right. 54void free_config(struct swaybar_config *config);
68 */
69uint32_t parse_position(const char *position); 55uint32_t parse_position(const char *position);
70 56
71/** 57#endif
72 * Parse font.
73 */
74char *parse_font(const char *font);
75
76/**
77 * Initialize default sway config.
78 */
79struct config *init_config();
80
81/**
82 * Free config struct.
83 */
84void free_config(struct config *config);
85
86#endif /* _SWAYBAR_CONFIG_H */