diff --git a/config.conf b/config.conf index 61d4efd2..82c20f5c 100644 --- a/config.conf +++ b/config.conf @@ -3,10 +3,12 @@ animations=1 animation_type=slide animation_fade_in=1 zoom_initial_ratio=0.5 -fadein_begin_opacity=0 +fadein_begin_opacity=0.5 +fadeout_begin_opacity=0.5 animation_duration_move=500 animation_duration_open=400 animation_duration_tag=350 +animation_duration_close=350 animation_curve=0.46,1.0,0.29,0.99 # Scroller Layout Setting @@ -211,20 +213,6 @@ bind=ALT+SHIFT,X,incgaps,1 bind=ALT+SHIFT,Z,incgaps,-1 bind=ALT+SHIFT,R,togglegaps -# switch tty -bind=Ctrl+Alt,F1,chvt,1 -bind=Ctrl+Alt,F2,chvt,2 -bind=Ctrl+Alt,F3,chvt,3 -bind=Ctrl+Alt,f4,chvt,4 -bind=Ctrl+Alt,F5,chvt,5 -bind=Ctrl+Alt,F6,chvt,6 -bind=Ctrl+Alt,F7,chvt,7 -bind=Ctrl+Alt,F8,chvt,8 -bind=Ctrl+Alt,F9,chvt,9 -bind=Ctrl+Alt,F10,chvt,10 -bind=Ctrl+Alt,F11,chvt,11 -bind=Ctrl+Alt,F12,chvt,12 - #custom app bind example # bind=SUPER,Return,spawn,google-chrome # bind=CTRL+ALT,Return,spawn,st -e ~/tool/ter-multiplexer.sh diff --git a/config.def.h b/config.def.h index ca160b16..bf5d1c96 100644 --- a/config.def.h +++ b/config.def.h @@ -11,6 +11,7 @@ static const char *animation_type = "slide"; //slide or zoom static const char animation_fade_in = 0; // Enable animation fade in static const float zoom_initial_ratio = 0.5; // Initial window ratio for animations static const float fadein_begin_opacity = 0; // Begin opacity for animations fasdein +static const float fadeout_begin_opacity = 0; // Begin opacity for animations fasdein static const uint32_t animation_duration_move = 500; // Animation move speed static const uint32_t animation_duration_open = 400; // Animation open speed static const uint32_t animation_duration_tag = 400; // Animation tag speed diff --git a/maomao.c b/maomao.c index 8c12d92a..34c24133 100644 --- a/maomao.c +++ b/maomao.c @@ -747,7 +747,7 @@ void fadeout_client_animation_next_tick(Client *c) { .height = height, }; - double opacity = MAX(1 - 0.4 - animation_passed, 0); + double opacity = MAX(fadeout_begin_opacity - animation_passed, 0); wlr_scene_node_for_each_buffer(&c->snapshot_scene->node, scene_buffer_apply_opacity, &opacity); diff --git a/parse_config.h b/parse_config.h index 4887167b..52a7da5e 100644 --- a/parse_config.h +++ b/parse_config.h @@ -63,6 +63,7 @@ typedef struct { char animation_fade_in; float zoom_initial_ratio; float fadein_begin_opacity; + float fadeout_begin_opacity; uint32_t animation_duration_move; uint32_t animation_duration_open; uint32_t animation_duration_tag; @@ -447,6 +448,8 @@ void parse_config_line(Config *config, const char *line) { config->zoom_initial_ratio = atof(value); } else if (strcmp(key, "fadein_begin_opacity") == 0) { config->fadein_begin_opacity = atof(value); + } else if (strcmp(key, "fadeout_begin_opacity") == 0) { + config->fadeout_begin_opacity = atof(value); } else if (strcmp(key, "animation_duration_move") == 0) { config->animation_duration_move = atoi(value); } else if (strcmp(key, "animation_duration_open") == 0) { @@ -876,6 +879,7 @@ void override_config(void) { animation_fade_in = config.animation_fade_in; zoom_initial_ratio = config.zoom_initial_ratio; fadein_begin_opacity = config.fadein_begin_opacity; + fadeout_begin_opacity = config.fadeout_begin_opacity; animation_duration_move = config.animation_duration_move; animation_duration_open = config.animation_duration_open; animation_duration_tag = config.animation_duration_tag; @@ -927,7 +931,8 @@ void set_value_default() { config.animations = 1; // 是否启用动画 config.animation_fade_in = 1; // Enable animation fade in config.zoom_initial_ratio = 0.5; // 动画起始窗口比例 -config.fadein_begin_opacity = 0; // Begin opac window ratio for animations +config.fadein_begin_opacity = 0.5; // Begin opac window ratio for animations +config.fadeout_begin_opacity = 0.5; config.animation_duration_move = 500; // Animation move speed config.animation_duration_open = 400; // Animation open speed config.animation_duration_tag = 300; // Animation tag speed diff --git a/preset_config.h b/preset_config.h index 80b86d39..0224ccde 100644 --- a/preset_config.h +++ b/preset_config.h @@ -9,7 +9,8 @@ char *animation_type = "slide"; // 是否启用动画 //slide,zoom int animations = 1; // 是否启用动画 char animation_fade_in = 1; // Enable animation fade in float zoom_initial_ratio = 0.5; // 动画起始窗口比例 -float fadein_begin_opacity = 0; // Begin opac window ratio for animations +float fadein_begin_opacity = 0.5; // Begin opac window ratio for animations +float fadeout_begin_opacity = 0.5; // Begin opac window ratio for animations uint32_t animation_duration_move = 500; // Animation move speed uint32_t animation_duration_open = 400; // Animation open speed uint32_t animation_duration_tag = 300; // Animation tag speed