feat: add some option to config.conf
This commit is contained in:
15
config.conf
15
config.conf
@@ -31,11 +31,24 @@ overviewgappo=30
|
|||||||
# Misc
|
# Misc
|
||||||
axis_bind_apply_timeout=100
|
axis_bind_apply_timeout=100
|
||||||
focus_on_activate=1
|
focus_on_activate=1
|
||||||
numlockon=1
|
|
||||||
bypass_surface_visibility=0
|
bypass_surface_visibility=0
|
||||||
sloppyfocus=1
|
sloppyfocus=1
|
||||||
warpcursor=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
|
# Appearance
|
||||||
gappih=5
|
gappih=5
|
||||||
gappiv=5
|
gappiv=5
|
||||||
|
|||||||
@@ -76,11 +76,25 @@ typedef struct {
|
|||||||
|
|
||||||
unsigned int axis_bind_apply_timeout;
|
unsigned int axis_bind_apply_timeout;
|
||||||
unsigned int focus_on_activate;
|
unsigned int focus_on_activate;
|
||||||
unsigned int numlockon;
|
|
||||||
int bypass_surface_visibility;
|
int bypass_surface_visibility;
|
||||||
int sloppyfocus;
|
int sloppyfocus;
|
||||||
int warpcursor;
|
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;
|
int smartgaps;
|
||||||
unsigned int gappih;
|
unsigned int gappih;
|
||||||
unsigned int gappiv;
|
unsigned int gappiv;
|
||||||
@@ -460,6 +474,24 @@ void parse_config_line(Config *config, const char *line) {
|
|||||||
config->warpcursor = atoi(value);
|
config->warpcursor = atoi(value);
|
||||||
} else if (strcmp(key, "smartgaps") == 0) {
|
} else if (strcmp(key, "smartgaps") == 0) {
|
||||||
config->smartgaps = atoi(value);
|
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) {
|
} else if (strcmp(key, "gappih") == 0) {
|
||||||
config->gappih = atoi(value);
|
config->gappih = atoi(value);
|
||||||
} else if (strcmp(key, "gappiv") == 0) {
|
} else if (strcmp(key, "gappiv") == 0) {
|
||||||
@@ -874,6 +906,16 @@ void parse_config(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void reload_config(const Arg *arg) {
|
void reload_config(const Arg *arg) {
|
||||||
|
Client *c;
|
||||||
free_config();
|
free_config();
|
||||||
parse_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);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user