mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-11 23:51:30 -04:00
feat: opt-in config field to have typical dwindle tiling
This commit is contained in:
parent
d1d25d0ee6
commit
f535332ee8
3 changed files with 45 additions and 1 deletions
|
|
@ -248,6 +248,7 @@ typedef struct {
|
|||
int32_t dwindle_preserve_split;
|
||||
int32_t dwindle_smart_split;
|
||||
int32_t dwindle_smart_resize;
|
||||
int32_t dwindle_smart_drop;
|
||||
float dwindle_split_ratio;
|
||||
|
||||
uint32_t hotarea_size;
|
||||
|
|
@ -1633,6 +1634,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_smart_drop") == 0) {
|
||||
config->dwindle_smart_drop = atoi(value);
|
||||
} else if (strcmp(key, "dwindle_split_ratio") == 0) {
|
||||
config->dwindle_split_ratio = atof(value);
|
||||
} else if (strcmp(key, "hotarea_size") == 0) {
|
||||
|
|
@ -3205,6 +3208,7 @@ 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_smart_drop = CLAMP_INT(config.dwindle_smart_drop, 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);
|
||||
|
|
@ -3351,6 +3355,7 @@ void set_value_default() {
|
|||
config.dwindle_preserve_split = 0;
|
||||
config.dwindle_smart_split = 0;
|
||||
config.dwindle_smart_resize = 0;
|
||||
config.dwindle_smart_drop = 1;
|
||||
config.dwindle_split_ratio = 0.5f;
|
||||
|
||||
config.log_level = WLR_ERROR;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue