mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-02 09:01:43 -05:00
Merge remote-tracking branch 'origin/main' into scenefx
This commit is contained in:
commit
31bd2814d2
10 changed files with 438 additions and 291 deletions
|
|
@ -255,6 +255,7 @@ typedef struct {
|
|||
|
||||
int single_scratchpad;
|
||||
int xwayland_persistence;
|
||||
int syncobj_enable;
|
||||
|
||||
struct xkb_rule_names xkb_rules;
|
||||
} Config;
|
||||
|
|
@ -674,6 +675,8 @@ FuncType parse_func_name(char *func_name, Arg *arg, char *arg_value,
|
|||
func = tagtoright;
|
||||
} else if (strcmp(func_name, "killclient") == 0) {
|
||||
func = killclient;
|
||||
} else if (strcmp(func_name, "focuslast") == 0) {
|
||||
func = focuslast;
|
||||
} else if (strcmp(func_name, "setlayout") == 0) {
|
||||
func = setlayout;
|
||||
(*arg).v = strdup(arg_value);
|
||||
|
|
@ -700,12 +703,13 @@ FuncType parse_func_name(char *func_name, Arg *arg, char *arg_value,
|
|||
} else if (strcmp(func_name, "focusmon") == 0) {
|
||||
func = focusmon;
|
||||
(*arg).i = parse_direction(arg_value);
|
||||
if((*arg).i == UNDIR) {
|
||||
if ((*arg).i == UNDIR) {
|
||||
(*arg).v = strdup(arg_value);
|
||||
}
|
||||
} else if (strcmp(func_name, "tagmon") == 0) {
|
||||
func = tagmon;
|
||||
(*arg).i = parse_direction(arg_value);
|
||||
(*arg).ui = atoi(arg_value2);
|
||||
} else if (strcmp(func_name, "incgaps") == 0) {
|
||||
func = incgaps;
|
||||
(*arg).i = atoi(arg_value);
|
||||
|
|
@ -915,6 +919,8 @@ void parse_config_line(Config *config, const char *line) {
|
|||
config->single_scratchpad = atoi(value);
|
||||
} else if (strcmp(key, "xwayland_persistence") == 0) {
|
||||
config->xwayland_persistence = atoi(value);
|
||||
} else if (strcmp(key, "syncobj_enable") == 0) {
|
||||
config->syncobj_enable = atoi(value);
|
||||
} else if (strcmp(key, "no_border_when_single") == 0) {
|
||||
config->no_border_when_single = atoi(value);
|
||||
} else if (strcmp(key, "snap_distance") == 0) {
|
||||
|
|
@ -2026,6 +2032,7 @@ void override_config(void) {
|
|||
|
||||
// 杂项设置
|
||||
xwayland_persistence = CLAMP_INT(config.xwayland_persistence, 0, 1);
|
||||
syncobj_enable = CLAMP_INT(config.syncobj_enable, 0, 1);
|
||||
axis_bind_apply_timeout =
|
||||
CLAMP_INT(config.axis_bind_apply_timeout, 0, 1000);
|
||||
focus_on_activate = CLAMP_INT(config.focus_on_activate, 0, 1);
|
||||
|
|
@ -2165,6 +2172,7 @@ void set_value_default() {
|
|||
config.focus_cross_tag = focus_cross_tag;
|
||||
config.single_scratchpad = single_scratchpad;
|
||||
config.xwayland_persistence = xwayland_persistence;
|
||||
config.syncobj_enable = syncobj_enable;
|
||||
config.no_border_when_single = no_border_when_single;
|
||||
config.snap_distance = snap_distance;
|
||||
config.drag_tile_to_tile = drag_tile_to_tile;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue