aboutsummaryrefslogtreecommitdiffstats
path: root/picom.conf
blob: 6d003b9da97e2f10916ac13f2720948a779950e5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# ╔══════════════════════════════════════════════════════════╗
# ║                    picom.conf                            ║
# ╚══════════════════════════════════════════════════════════╝

# ── Backend ──────────────────────────────────────────────────────────────────

backend = "glx";

# ── Vsync ────────────────────────────────────────────────────────────────────

vsync = true;

# ── Custom shader (gradient window borders) ───────────────────────────────────
# Place gradient-border.glsl in ~/.config/picom/ then uncomment:
window-shader-fg-rule = [
  "/home/lanceb/.config/picom/gradient-border.glsl:focused"
];
glx-copy-from-front = false;
use-damage = true;

# ── Corner Rounding ───────────────────────────────────────────────────────────

corner-radius = 5;

# Exclude corners on certain window types (optional – comment out if unwanted)
rounded-corners-exclude = [
  "window_type = 'dock'",
  "window_type = 'desktop'",
  "class_g = 'Polybar'",
  "class_g = 'Rofi'"
];

# ── Opacity ───────────────────────────────────────────────────────────────────

# Unfocused windows get 0.8 opacity
inactive-opacity = 0.8;

# Focused / active windows are fully opaque
active-opacity = 1.0;

# Don't let applications override opacity via EWMH hints (set true to respect them)
inactive-opacity-override = false;

# Exclude certain windows from opacity rules
opacity-rule = [
  "100:window_type = 'dock'",
  "100:window_type = 'desktop'",
  "100:class_g = 'Rofi'",
  "100:_NET_WM_STATE@:32a *= '_NET_WM_STATE_FULLSCREEN'"
];

# ── Background Blur ───────────────────────────────────────────────────────────

blur-background = true;
blur-method = "dual_kawase";
blur-strength = 5;

# Don't blur behind the desktop itself
blur-background-exclude = [
  "window_type = 'dock'",
  "window_type = 'desktop'",
  "_GTK_FRAME_EXTENTS@:c"
];

# ── Shadows ───────────────────────────────────────────────────────────────────

shadow = true;
shadow-radius = 12;
shadow-offset-x = -6;
shadow-offset-y = -6;
shadow-opacity = 0.6;

shadow-exclude = [
  "window_type = 'dock'",
  "window_type = 'desktop'",
  "_GTK_FRAME_EXTENTS@:c"
];

# ── Fading ────────────────────────────────────────────────────────────────────

fading = true;
fade-in-step = 0.03;
fade-out-step = 0.03;
fade-delta = 5;

# ── Window Type Tweaks ────────────────────────────────────────────────────────

wintypes:
{
  normal        = { fade = true; shadow = true; };
  tooltip       = { fade = true; shadow = false; opacity = 0.9; focus = true; };
  dock          = { shadow = false; clip-shadow-above = true; };
  dnd           = { shadow = false; };
  popup_menu    = { opacity = 0.95; };
  dropdown_menu = { opacity = 0.95; };
};

# ── Animations ───────────────────────────────────────────────────────────────

animations = ({
    triggers = ["open", "show"];
    
    scale-x = {
        curve = "cubic-bezier(0.22, 1, 0.36, 1)";
        duration = 0.18;
        start = 0.85;
        end = 1;
    };
    
    scale-y = "scale-x";

    offset-x = "(1 - scale-x) / 2 * window-width";
    offset-y = "(1 - scale-y) / 2 * window-height";

    shadow-scale-x = "scale-x";
    shadow-scale-y = "scale-y";
    shadow-offset-x = "offset-x";
    shadow-offset-y = "offset-y";

}, {
    triggers = ["close", "hide"];

    scale-x = {
        curve = "cubic-bezier(0.4, 0, 1, 1)";
        duration = 0.15;
        start = 1;
        end = 1.1;
    };

    scale-y = "scale-x";

    offset-x = "(1 - scale-x) / 2 * window-width";
    offset-y = "(1 - scale-y) / 2 * window-height";

    shadow-scale-x = "scale-x";
    shadow-scale-y = "scale-y";
    shadow-offset-x = "offset-x";
    shadow-offset-y = "offset-y";

    opacity = {
        curve = "linear";
        duration = 0.15;
        start = "window-raw-opacity-before";
        end = 0;
    };

    shadow-opacity = "opacity";
});