mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-06-14 14:33:10 -04:00
feat: add hide cursor on keypress option (#871)
This commit is contained in:
parent
ccb58a4f1a
commit
a429420b73
3 changed files with 13 additions and 1 deletions
|
|
@ -261,6 +261,7 @@ typedef struct {
|
|||
int32_t overviewgappi;
|
||||
int32_t overviewgappo;
|
||||
uint32_t cursor_hide_timeout;
|
||||
uint32_t cursor_hide_on_keypress;
|
||||
|
||||
uint32_t axis_bind_apply_timeout;
|
||||
uint32_t focus_on_activate;
|
||||
|
|
@ -1714,6 +1715,8 @@ bool parse_option(Config *config, char *key, char *value) {
|
|||
config->overviewgappo = atoi(value);
|
||||
} else if (strcmp(key, "cursor_hide_timeout") == 0) {
|
||||
config->cursor_hide_timeout = atoi(value);
|
||||
} else if (strcmp(key, "cursor_hide_on_keypress") == 0) {
|
||||
config->cursor_hide_on_keypress = atoi(value);
|
||||
} else if (strcmp(key, "axis_bind_apply_timeout") == 0) {
|
||||
config->axis_bind_apply_timeout = atoi(value);
|
||||
} else if (strcmp(key, "focus_on_activate") == 0) {
|
||||
|
|
@ -3346,6 +3349,8 @@ void override_config(void) {
|
|||
CLAMP_INT(config.no_radius_when_single, 0, 1);
|
||||
config.cursor_hide_timeout =
|
||||
CLAMP_INT(config.cursor_hide_timeout, 0, 36000);
|
||||
config.cursor_hide_on_keypress =
|
||||
CLAMP_INT(config.cursor_hide_on_keypress, 0, 1);
|
||||
config.single_scratchpad = CLAMP_INT(config.single_scratchpad, 0, 1);
|
||||
config.repeat_rate = CLAMP_INT(config.repeat_rate, 1, 1000);
|
||||
config.repeat_delay = CLAMP_INT(config.repeat_delay, 1, 20000);
|
||||
|
|
@ -3507,6 +3512,7 @@ void set_value_default() {
|
|||
config.overviewgappi = 5;
|
||||
config.overviewgappo = 30;
|
||||
config.cursor_hide_timeout = 0;
|
||||
config.cursor_hide_on_keypress = 0;
|
||||
|
||||
config.warpcursor = 1;
|
||||
config.drag_corner = 3;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue