aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config.c31
-rw-r--r--src/config.h4
-rw-r--r--src/config_libconfig.c4
-rw-r--r--src/options.c8
-rw-r--r--src/picom.c4
-rw-r--r--src/win.c8
6 files changed, 45 insertions, 14 deletions
diff --git a/src/config.c b/src/config.c
index d24bf64..d415757 100644
--- a/src/config.c
+++ b/src/config.c
@@ -548,7 +548,7 @@ char *parse_config(options_t *opt, const char *config_file, bool *shadow_enable,
bool *fading_enable, bool *hasneg, win_option_mask_t *winopt_mask) {
// clang-format off
*opt = (struct options){
- .backend = BKEND_XRENDER,
+ .backend = BKEND_GLX,
.glx_no_stencil = false,
.mark_wmwin_focused = false,
.mark_ovredir_focused = false,
@@ -571,7 +571,7 @@ char *parse_config(options_t *opt, const char *config_file, bool *shadow_enable,
.shadow_red = 0.0,
.shadow_green = 0.0,
.shadow_blue = 0.0,
- .shadow_radius = 18,
+ .shadow_radius = 12,
.shadow_offset_x = -15,
.shadow_offset_y = -15,
.shadow_opacity = .75,
@@ -580,24 +580,24 @@ char *parse_config(options_t *opt, const char *config_file, bool *shadow_enable,
.xinerama_shadow_crop = false,
.shadow_clip_list = NULL,
- .corner_radius = 0,
+ .corner_radius = 12,
- .fade_in_step = 0.028,
+ .fade_in_step = 0.03,
.fade_out_step = 0.03,
.fade_delta = 10,
.no_fading_openclose = false,
.no_fading_destroyed_argb = false,
.fade_blacklist = NULL,
- .animations = false,
- .animation_for_open_window = OPEN_WINDOW_ANIMATION_NONE,
- .animation_for_transient_window = OPEN_WINDOW_ANIMATION_NONE,
- .animation_for_unmap_window = OPEN_WINDOW_ANIMATION_AUTO,
- .animation_for_workspace_switch_in = OPEN_WINDOW_ANIMATION_AUTO,
- .animation_for_workspace_switch_out = OPEN_WINDOW_ANIMATION_AUTO,
- .animation_stiffness = 200.0,
- .animation_window_mass = 1.0,
- .animation_dampening = 25,
+ .animations = true,
+ .animation_for_open_window = OPEN_WINDOW_ANIMATION_ZOOM,
+ .animation_for_transient_window = OPEN_WINDOW_ANIMATION_ZOOM,
+ .animation_for_unmap_window = OPEN_WINDOW_ANIMATION_ZOOM,
+ .animation_for_workspace_switch_in = OPEN_WINDOW_ANIMATION_ZOOM,
+ .animation_for_workspace_switch_out = OPEN_WINDOW_ANIMATION_ZOOM,
+ .animation_stiffness = 100.0,
+ .animation_window_mass = 0.5,
+ .animation_dampening = 10,
.animation_delta = 10,
.animation_force_steps = false,
.animation_clamping = true,
@@ -631,7 +631,10 @@ char *parse_config(options_t *opt, const char *config_file, bool *shadow_enable,
.track_leader = false,
- .rounded_corners_blacklist = NULL
+ .rounded_corners_blacklist = NULL,
+
+ .animation_open_blacklist = NULL,
+ .animation_unmap_blacklist = NULL
};
// clang-format on
diff --git a/src/config.h b/src/config.h
index a22d222..ba0dcbc 100644
--- a/src/config.h
+++ b/src/config.h
@@ -277,6 +277,10 @@ typedef struct options {
/// Rounded corners blacklist. A linked list of conditions.
c2_lptr_t *rounded_corners_blacklist;
+ c2_lptr_t *animation_open_blacklist;
+
+ c2_lptr_t *animation_unmap_blacklist;
+
// === Focus related ===
/// Whether to try to detect WM windows and mark them as focused.
bool mark_wmwin_focused;
diff --git a/src/config_libconfig.c b/src/config_libconfig.c
index 7d266cd..4bb4cbf 100644
--- a/src/config_libconfig.c
+++ b/src/config_libconfig.c
@@ -616,6 +616,10 @@ char *parse_config_libconfig(options_t *opt, const char *config_file, bool *shad
lcfg_lookup_bool(&cfg, "animation-clamping", &opt->animation_clamping);
// --focus-exclude
parse_cfg_condlst(&cfg, &opt->focus_blacklist, "focus-exclude");
+ // animation exclude
+ parse_cfg_condlst(&cfg, &opt->animation_open_blacklist, "animation-open-exclude");
+ // animation exclude
+ parse_cfg_condlst(&cfg, &opt->animation_unmap_blacklist, "animation-unmap-exclude");
// --invert-color-include
parse_cfg_condlst(&cfg, &opt->invert_color_list, "invert-color-include");
// --blur-background-exclude
diff --git a/src/options.c b/src/options.c
index ee92ef8..948d60f 100644
--- a/src/options.c
+++ b/src/options.c
@@ -527,6 +527,8 @@ static const struct option longopts[] = {
{"animation-clamping", no_argument, NULL, 808},
{"animation-for-open-window", required_argument, NULL, 809},
{"animation-for-transient-window", required_argument, NULL, 810},
+ {"animation-open-exclude", required_argument, NULL, 830},
+ {"animation-unmap-exclude", required_argument, NULL, 831},
// Must terminate with a NULL entry
{NULL, 0, NULL, 0},
};
@@ -985,6 +987,12 @@ bool get_cfg(options_t *opt, int argc, char *const *argv, bool shadow_enable,
}
break;
}
+ case 830:
+ condlst_add(&opt->animation_open_blacklist, optarg);
+ break;
+ case 831:
+ condlst_add(&opt->animation_unmap_blacklist, optarg);
+ break;
case 810: {
// --animation-for-transient-window
enum open_window_animation animation = parse_open_window_animation(optarg);
diff --git a/src/picom.c b/src/picom.c
index eb479f3..83716cb 100644
--- a/src/picom.c
+++ b/src/picom.c
@@ -2144,6 +2144,8 @@ static session_t *session_init(int argc, char **argv, Display *dpy,
c2_list_postprocess(ps, ps->o.invert_color_list) &&
c2_list_postprocess(ps, ps->o.opacity_rules) &&
c2_list_postprocess(ps, ps->o.rounded_corners_blacklist) &&
+ c2_list_postprocess(ps, ps->o.animation_open_blacklist) &&
+ c2_list_postprocess(ps, ps->o.animation_unmap_blacklist) &&
c2_list_postprocess(ps, ps->o.focus_blacklist))) {
log_error("Post-processing of conditionals failed, some of your rules "
"might not work");
@@ -2524,6 +2526,8 @@ static void session_destroy(session_t *ps) {
free_wincondlst(&ps->o.paint_blacklist);
free_wincondlst(&ps->o.unredir_if_possible_blacklist);
free_wincondlst(&ps->o.rounded_corners_blacklist);
+ free_wincondlst(&ps->o.animation_open_blacklist);
+ free_wincondlst(&ps->o.animation_unmap_blacklist);
// Free tracked atom list
{
diff --git a/src/win.c b/src/win.c
index 971bdc9..b37eb34 100644
--- a/src/win.c
+++ b/src/win.c
@@ -457,6 +457,10 @@ static void init_animation(session_t *ps, struct managed_win *w) {
animation = ps->o.animation_for_workspace_switch_in;
}
+ if (c2_match(ps, w, ps->o.animation_open_blacklist, NULL)) {
+ animation = OPEN_WINDOW_ANIMATION_NONE;
+ }
+
switch (animation) {
case OPEN_WINDOW_ANIMATION_AUTO:
case OPEN_WINDOW_ANIMATION_NONE: { // No animation
@@ -572,6 +576,10 @@ static void init_animation_unmap(session_t *ps, struct managed_win *w) {
animation = ps->o.wintype_option[w->window_type].animation_unmap;
}
+ if (c2_match(ps, w, ps->o.animation_unmap_blacklist, NULL)) {
+ animation = OPEN_WINDOW_ANIMATION_NONE;
+ }
+
if (ps->root_desktop_switch_direction != 0) {
if (ps->o.animation_for_workspace_switch_out == OPEN_WINDOW_ANIMATION_AUTO)
animation = OPEN_WINDOW_ANIMATION_SLIDE_OUT;