summaryrefslogtreecommitdiffstats
path: root/swaybar/state.h
diff options
context:
space:
mode:
Diffstat (limited to 'swaybar/state.h')
-rw-r--r--swaybar/state.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/swaybar/state.h b/swaybar/state.h
new file mode 100644
index 00000000..5949548e
--- /dev/null
+++ b/swaybar/state.h
@@ -0,0 +1,43 @@
1#ifndef _SWAYBAR_STATE_H
2#define _SWAYBAR_STATE_H
3
4#include "client/registry.h"
5#include "client/window.h"
6
7struct swaybar_state {
8 struct swaybar_config *config;
9 struct status_line *status;
10 struct output *output;
11 /* list_t *outputs; */
12
13 int ipc_event_socketfd;
14 int ipc_socketfd;
15 int status_read_fd;
16 pid_t status_command_pid;
17};
18
19struct output {
20 struct window *window;
21 struct registry *registry;
22 list_t *workspaces;
23};
24
25struct workspace {
26 int num;
27 char *name;
28 bool focused;
29 bool visible;
30 bool urgent;
31};
32
33/**
34 * Initialize state.
35 */
36struct swaybar_state *init_state();
37
38/**
39 * free workspace struct.
40 */
41void free_workspace(void *item);
42
43#endif /* _SWAYBAR_STATE_H */