-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.h
58 lines (47 loc) · 1.24 KB
/
config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef _CONFIG_MANAGER_H_
#define _CONFIG_MANAGER_H_
#include "atlas.h"
// Configuration structure
typedef struct {
// Gaps
unsigned int outerGaps;
unsigned int innerGaps;
// Border
unsigned int borderWidth;
char borderActiveColor[8];
char borderInactiveColor[8];
// Layout
int snapDistance;
float masterFactor;
int lockFullscreen;
// Window
int focusNewWindows;
int moveCursorWithFocus;
// Keybindings
Keybinding *keybindings;
size_t keybindingCount;
size_t keybindingCapacity;
// Workspaces
Workspace *workspaces;
size_t workspaceCount;
// General
StartupProgram *startup_progs;
int startup_prog_count;
char *logLevel;
} Config;
// Global configuration instance
extern Config cfg;
extern Display *display;
extern Monitor *monitors;
extern Monitor *selectedMonitor;
// Function declarations
int load_config(const char *config_path);
void apply_config(void);
void reload_config(void);
ActionType string_to_action(const char *action);
unsigned int parse_modifier(const char *mod);
KeySym parse_key(const char *key);
void register_keybinding(Keybinding *binding);
void free_startup_programs(Config *cfg);
void parse_startup_program(const char *cmd_str, StartupProgram *prog);
#endif // _CONFIG_MANAGER_H_