mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-10 23:50:41 -04:00
feat: opt-in config field to have typical dwindle tiling
This commit is contained in:
parent
b0bd70d225
commit
bb1443a063
3 changed files with 46 additions and 1 deletions
|
|
@ -243,6 +243,7 @@ typedef struct {
|
|||
int32_t dwindle_preserve_split;
|
||||
int32_t dwindle_smart_split;
|
||||
int32_t dwindle_smart_resize;
|
||||
int32_t dwindle_drop_simple_split;
|
||||
float dwindle_split_ratio;
|
||||
|
||||
uint32_t hotarea_size;
|
||||
|
|
@ -1576,6 +1577,8 @@ bool parse_option(Config *config, char *key, char *value) {
|
|||
config->dwindle_smart_split = atoi(value);
|
||||
} else if (strcmp(key, "dwindle_smart_resize") == 0) {
|
||||
config->dwindle_smart_resize = atoi(value);
|
||||
} else if (strcmp(key, "dwindle_drop_simple_split") == 0) {
|
||||
config->dwindle_drop_simple_split = atoi(value);
|
||||
} else if (strcmp(key, "dwindle_split_ratio") == 0) {
|
||||
config->dwindle_split_ratio = atof(value);
|
||||
} else if (strcmp(key, "hotarea_size") == 0) {
|
||||
|
|
@ -3118,6 +3121,8 @@ void override_config(void) {
|
|||
CLAMP_INT(config.dwindle_preserve_split, 0, 1);
|
||||
config.dwindle_smart_split = CLAMP_INT(config.dwindle_smart_split, 0, 1);
|
||||
config.dwindle_smart_resize = CLAMP_INT(config.dwindle_smart_resize, 0, 1);
|
||||
config.dwindle_drop_simple_split =
|
||||
CLAMP_INT(config.dwindle_drop_simple_split, 0, 1);
|
||||
config.dwindle_split_ratio =
|
||||
CLAMP_FLOAT(config.dwindle_split_ratio, 0.05f, 0.95f);
|
||||
config.hotarea_size = CLAMP_INT(config.hotarea_size, 1, 1000);
|
||||
|
|
@ -3239,6 +3244,7 @@ void set_value_default() {
|
|||
config.dwindle_preserve_split = 0;
|
||||
config.dwindle_smart_split = 0;
|
||||
config.dwindle_smart_resize = 0;
|
||||
config.dwindle_drop_simple_split = 0;
|
||||
config.dwindle_split_ratio = 0.5f;
|
||||
|
||||
config.log_level = WLR_ERROR;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue