aboutsummaryrefslogtreecommitdiffstats
path: root/include/swaybar/config.h
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-03-28 23:04:20 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-03-29 22:11:08 -0400
commitcab1352801b62d1b8a12ca1c995cb24445ce4bc9 (patch)
treebc67373916c06d48700c4f69b8c2470a2f86887f /include/swaybar/config.h
parentAllow sway IPC clients to fall back to i3 socket (diff)
downloadsway-cab1352801b62d1b8a12ca1c995cb24445ce4bc9.tar.gz
sway-cab1352801b62d1b8a12ca1c995cb24445ce4bc9.tar.zst
sway-cab1352801b62d1b8a12ca1c995cb24445ce4bc9.zip
Start port of swaybar to layer shell
This starts up the event loop and wayland display and shims out the basic top level rendering concepts. Also includes some changes to incorporate pango into the 1.x codebase properly.
Diffstat (limited to 'include/swaybar/config.h')
-rw-r--r--include/swaybar/config.h43
1 files changed, 6 insertions, 37 deletions
diff --git a/include/swaybar/config.h b/include/swaybar/config.h
index 651f0ee3..1bfe4843 100644
--- a/include/swaybar/config.h
+++ b/include/swaybar/config.h
@@ -1,9 +1,7 @@
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 "list.h"
8#include "util.h" 6#include "util.h"
9 7
@@ -19,10 +17,10 @@ struct box_colors {
19/** 17/**
20 * Swaybar config. 18 * Swaybar config.
21 */ 19 */
22struct config { 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;
@@ -32,18 +30,6 @@ struct config {
32 bool workspace_buttons; 30 bool workspace_buttons;
33 bool all_outputs; 31 bool all_outputs;
34 list_t *outputs; 32 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; 33 int height;
48 34
49 struct { 35 struct {
@@ -63,24 +49,7 @@ struct config {
63 } colors; 49 } colors;
64}; 50};
65 51
66/** 52struct swaybar_config *init_config();
67 * Parse position top|bottom|left|right. 53void free_config(struct swaybar_config *config);
68 */
69uint32_t parse_position(const char *position);
70
71/**
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 54
86#endif /* _SWAYBAR_CONFIG_H */ 55#endif