1# Thank you code_nomad: http://9m.no/ꪯ鵞
2# and Arch Wiki contributors: https://wiki.archlinux.org/index.php/Compton
3
4#################################
5#
6# Backend
7#
8#################################
9
10# Backend to use: "xrender" or "glx".
11# GLX backend is typically much faster but depends on a sane driver.
12backend = "glx";
13
14#################################
15#
16# GLX backend
17#
18#################################
19
20# GLX backend: Copy unmodified regions from front buffer instead of redrawing them all.
21# My tests with nvidia-drivers show a 10% decrease in performance when the whole screen is modified,
22# but a 20% increase when only 1/4 is.
23# My tests on nouveau show terrible slowdown.
24glx-copy-from-front = false;
25
26# GLX backend: Use MESA_copy_sub_buffer to do partial screen update.
27# My tests on nouveau shows a 200% performance boost when only 1/4 of the screen is updated.
28# May break VSync and is not available on some drivers.
29# Overrides --glx-copy-from-front.
30# glx-use-copysubbuffermesa = true;
31
32# GLX backend: GLX buffer swap method we assume.
33# Could be undefined (0), copy (1), exchange (2), 3-6, or buffer-age (-1).
34# undefined is the slowest and the safest, and the default value.
35# copy is fastest, but may fail on some drivers,
36# 2-6 are gradually slower but safer (6 is still faster than 0).
37# Usually, double buffer means 2, triple buffer means 3.
38# buffer-age means auto-detect using GLX_EXT_buffer_age, supported by some drivers.
39# Useless with --glx-use-copysubbuffermesa.
40# Partially breaks --resize-damage.
41# Defaults to undefined.
42#glx-swap-method = "undefined";
43
44#################################
45#
46# Shadows
47#
48#################################
49
50# Enabled client-side shadows on windows.
51shadow = true;
52# The blur radius for shadows. (default 12)
53# shadow-radius = 5;
54# The left offset for shadows. (default -15)
55# shadow-offset-x = -5;
56# The top offset for shadows. (default -15)
57# shadow-offset-y = -5;
58# The translucency for shadows. (default .75)
59# shadow-opacity = 0.5;
60
61# Set if you want different colour shadows
62# shadow-red = 0.0;
63# shadow-green = 0.0;
64# shadow-blue = 0.0;
65
66# The shadow exclude options are helpful if you have shadows enabled. Due to the way compton draws its shadows, certain applications will have visual glitches
67# (most applications are fine, only apps that do weird things with xshapes or argb are affected).
68# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
69 shadow-exclude = [
70# "! name~=''",
71# "name = 'Notification'",
72# "name = 'Plank'",
73# "name = 'Docky'",
74# "name = 'Kupfer'",
75# "name = 'xfce4-notifyd'",
76# "name *= 'VLC'",
77# "name *= 'VLC'",
78# "name *= 'compton'",
79# "name *= 'Chromium'",
80# "name *= 'Chrome'",
81 "class_g = 'Firefox'",
82# "class_g = 'Conky'",
83# "class_g = 'Kupfer'",
84# "class_g = 'Synapse'",
85# "class_g ?= 'Notify-osd'",
86# "class_g ?= 'Cairo-dock'",
87# "class_g ?= 'Xfce4-notifyd'",
88 "class_g ?= 'i3-frame'",
89# "_GTK_FRAME_EXTENTS@",
90# "_NET_WM_STATE@ *= '_NET_WM_STATE_HIDDEN'"
91 "_NET_WM_WINDOW_TYPE@ *= '_NET_WM_WINDOW_TYPE_DOCK'",
92 "I3_FLOATING_WINDOW@ != 1"
93 ];
94# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners)
95# shadow-ignore-shaped = false;
96
97#################################
98#
99# Opacity
100#
101#################################
102
103#inactive-opacity = 0.95;
104active-opacity = 1;
105frame-opacity = 1;
106inactive-opacity-override = false;
107
108# Dim inactive windows. (0.0 - 1.0)
109#inactive-dim = 0.25;
110# Do not let dimness adjust based on window opacity.
111inactive-dim-fixed = true;
112# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred.
113blur-background = false;
114# Blur background of opaque windows with transparent frames as well.
115blur-background-frame = true;
116# Do not let blur radius adjust based on window opacity.
117blur-background-fixed = false;
118blur-background-exclude = [
119 "class_g = 'Polybar'",
120];
121
122#blur: {
123# method = "box";
124# size = 10;
125# deviation = 5.0;
126#}
127
128#################################
129#
130# Fading
131#
132#################################
133
134# Fade windows during opacity changes.
135fading = true;
136# The time between steps in a fade in milliseconds. (default 10).
137fade-delta = 4;
138# Opacity change between steps while fading in. (default 0.028).
139fade-in-step = 0.028;
140# Opacity change between steps while fading out. (default 0.03).
141fade-out-step = 0.03;
142# Fade windows in/out when opening/closing
143# no-fading-openclose = true;
144
145# Specify a list of conditions of windows that should not be faded.
146fade-exclude = [ ];
147
148#################################
149#
150# Other
151#
152#################################
153
154# Try to detect WM windows and mark them as active.
155mark-wmwin-focused = true;
156# Mark all non-WM but override-redirect windows active (e.g. menus).
157mark-ovredir-focused = true;
158# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events.
159# Usually more reliable but depends on a EWMH-compliant WM.
160use-ewmh-active-win = true;
161# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
162detect-rounded-corners = true;
163
164# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows.
165# This prevents opacity being ignored for some apps.
166# For example without this enabled my xfce4-notifyd is 100% opacity no matter what.
167detect-client-opacity = true;
168
169# Vertical synchronization: match the refresh rate of the monitor
170vsync = false;
171
172# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing.
173# Reported to have no effect, though.
174dbe = false;
175
176# Limit compton to repaint at most once every 1 / refresh_rate second to boost performance.
177# This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already,
178# unless you wish to specify a lower refresh rate than the actual value.
179#sw-opti = true;
180
181# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games.
182# Known to cause flickering when redirecting/unredirecting windows.
183unredir-if-possible = false;
184
185# Specify a list of conditions of windows that should always be considered focused.
186focus-exclude = [
187 "name *= 'mpv'",
188 "name *= 'VLC media player'",
189 "name = 'Picture-in-Picture'",
190 "name = 'scrcpy'"
191];
192
193# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time.
194detect-transient = false;
195# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time.
196# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too.
197detect-client-leader = false;
198
199#################################
200#
201# Window type settings
202#
203#################################
204
205wintypes:
206{
207 tooltip =
208 {
209 # fade: Fade the particular type of windows.
210 fade = true;
211 # shadow: Give those windows shadow
212 shadow = true;
213 # opacity: Default opacity for the type of windows.
214 opacity = 0.85;
215 # focus: Whether to always consider windows of this type focused.
216 focus = true;
217 };
218};
219
220######################
221#
222# XSync
223# See: https://github.com/yshui/compton/commit/b18d46bcbdc35a3b5620d817dd46fbc76485c20d
224#
225######################
226
227# Use X Sync fence to sync clients' draw calls. Needed on nvidia-drivers with GLX backend for some users.
228xrender-sync-fence = true;