-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.h
47 lines (38 loc) · 970 Bytes
/
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
#pragma once
#include "main.h"
#include <X11/X.h>
typedef struct {
char *name;
char *data;
} ConfigMpvFlag;
typedef struct {
int count;
ConfigMpvFlag flags[MAX_MPV_FLAGS];
} ConfigMpvFlags;
typedef struct {
char *name;
char *main;
char *sub;
ConfigMpvFlags mpv_flags;
ConfigMpvFlags main_mpv_flags;
ConfigMpvFlags sub_mpv_flags;
} ConfigStream;
typedef struct {
KeySym quit[MAX_KEYBINDINGS];
KeySym home[MAX_KEYBINDINGS];
KeySym next[MAX_KEYBINDINGS];
KeySym previous[MAX_KEYBINDINGS];
KeySym reload[MAX_KEYBINDINGS];
} ConfigKeyMap;
typedef struct {
const char *config_file;
const char *layout_file;
ConfigMpvFlags mpv_flags;
ConfigMpvFlags main_mpv_flags;
ConfigMpvFlags sub_mpv_flags;
int stream_count;
ConfigStream streams[MAX_STREAMS];
ConfigKeyMap key_map;
} Config;
void config_parse(Config *config, int argc, const char *argv[]);
void config_unique_merge_mpv_flags(ConfigMpvFlags *to, ConfigMpvFlags from);