mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
feat: add some option to config.conf
This commit is contained in:
parent
1d8f226ca3
commit
41b192b85f
2 changed files with 57 additions and 2 deletions
15
config.conf
15
config.conf
|
|
@ -31,11 +31,24 @@ overviewgappo=30
|
|||
# Misc
|
||||
axis_bind_apply_timeout=100
|
||||
focus_on_activate=1
|
||||
numlockon=1
|
||||
bypass_surface_visibility=0
|
||||
sloppyfocus=1
|
||||
warpcursor=1
|
||||
|
||||
# keyboard
|
||||
repeat_rate=25
|
||||
repeat_delay=600
|
||||
numlockon=1
|
||||
|
||||
# Trackpad
|
||||
tap_to_click=1
|
||||
tap_and_drag=1
|
||||
drag_lock=1
|
||||
natural_scrolling=0
|
||||
disable_while_typing=1
|
||||
left_handed=0
|
||||
middle_button_emulation=0
|
||||
|
||||
# Appearance
|
||||
gappih=5
|
||||
gappiv=5
|
||||
|
|
|
|||
|
|
@ -76,11 +76,25 @@ typedef struct {
|
|||
|
||||
unsigned int axis_bind_apply_timeout;
|
||||
unsigned int focus_on_activate;
|
||||
unsigned int numlockon;
|
||||
int bypass_surface_visibility;
|
||||
int sloppyfocus;
|
||||
int warpcursor;
|
||||
|
||||
/* keyboard */
|
||||
int repeat_rate;
|
||||
int repeat_delay;
|
||||
unsigned int numlockon;
|
||||
|
||||
/* Trackpad */
|
||||
int tap_to_click;
|
||||
int tap_and_drag;
|
||||
int drag_lock;
|
||||
int natural_scrolling;
|
||||
int disable_while_typing;
|
||||
int left_handed;
|
||||
int middle_button_emulation;
|
||||
|
||||
|
||||
int smartgaps;
|
||||
unsigned int gappih;
|
||||
unsigned int gappiv;
|
||||
|
|
@ -460,6 +474,24 @@ void parse_config_line(Config *config, const char *line) {
|
|||
config->warpcursor = atoi(value);
|
||||
} else if (strcmp(key, "smartgaps") == 0) {
|
||||
config->smartgaps = atoi(value);
|
||||
} else if (strcmp(key, "repeat_rate") == 0) {
|
||||
config->repeat_rate = atoi(value);
|
||||
} else if (strcmp(key, "repeat_delay") == 0) {
|
||||
config->repeat_delay = atoi(value);
|
||||
} else if (strcmp(key, "tap_to_click") == 0) {
|
||||
config->tap_to_click = atoi(value);
|
||||
} else if (strcmp(key, "tap_and_drag") == 0) {
|
||||
config->tap_and_drag = atoi(value);
|
||||
} else if (strcmp(key, "drag_lock") == 0) {
|
||||
config->drag_lock = atoi(value);
|
||||
} else if (strcmp(key, "natural_scrolling") == 0) {
|
||||
config->natural_scrolling = atoi(value);
|
||||
} else if (strcmp(key, "disable_while_typing") == 0) {
|
||||
config->disable_while_typing = atoi(value);
|
||||
} else if (strcmp(key, "left_handed") == 0) {
|
||||
config->left_handed = atoi(value);
|
||||
} else if (strcmp(key, "middle_button_emulation") == 0) {
|
||||
config->middle_button_emulation = atoi(value);
|
||||
} else if (strcmp(key, "gappih") == 0) {
|
||||
config->gappih = atoi(value);
|
||||
} else if (strcmp(key, "gappiv") == 0) {
|
||||
|
|
@ -874,6 +906,16 @@ void parse_config(void) {
|
|||
}
|
||||
|
||||
void reload_config(const Arg *arg) {
|
||||
Client *c;
|
||||
free_config();
|
||||
parse_config();
|
||||
init_baked_points();
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
if (c&& !c->iskilling) {
|
||||
if (c->bw) {
|
||||
c->bw = borderpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
arrange(selmon,false);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue