summaryrefslogtreecommitdiffstats
path: root/include/config.h
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2015-08-16 11:02:56 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2015-08-16 11:02:56 -0400
commit7f8ebb7d0dcb687574554b877a0e84f48718df37 (patch)
tree9a58f9276059d3c88cb3a92d8229a911b33b0faf /include/config.h
parentAdd split [h|v|horizontal|vertical] command (diff)
downloadsway-7f8ebb7d0dcb687574554b877a0e84f48718df37.tar.gz
sway-7f8ebb7d0dcb687574554b877a0e84f48718df37.tar.zst
sway-7f8ebb7d0dcb687574554b877a0e84f48718df37.zip
Move headers to include/
Diffstat (limited to 'include/config.h')
-rw-r--r--include/config.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h
new file mode 100644
index 00000000..c9fd374c
--- /dev/null
+++ b/include/config.h
@@ -0,0 +1,44 @@
1#ifndef _SWAY_CONFIG_H
2#define _SWAY_CONFIG_H
3
4#include <stdint.h>
5#include <wlc/wlc.h>
6#include "list.h"
7
8struct sway_variable {
9 char *name;
10 char *value;
11};
12
13struct sway_binding {
14 list_t *keys;
15 uint32_t modifiers;
16 char *command;
17};
18
19struct sway_mode {
20 char *name;
21 list_t *bindings;
22};
23
24struct sway_config {
25 list_t *symbols;
26 list_t *modes;
27 list_t *cmd_queue;
28 struct sway_mode *current_mode;
29
30 // Flags
31 bool focus_follows_mouse;
32 bool mouse_warping;
33 bool active;
34 bool failed;
35 bool reloading;
36};
37
38bool load_config();
39bool read_config(FILE *file, bool is_active);
40char *do_var_replacement(struct sway_config *config, char *str);
41
42extern struct sway_config *config;
43
44#endif