To correctly set up Compton in i3, follow these steps:
- Install Compton:
sudo apt install compton - Create a Compton configuration file:
touch ~/.config/compton.conf - Open the Compton configuration file in a text editor:
nano ~/.config/compton.conf - Add the following lines to the configuration file:
# Basic configuration backend = "glx"; vsync = "opengl-swc"; # Opacity settings opacity-rule = [ "0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'" ]; # Shadow settings shadow = true; no-dnd-shadow = true; no-dock-shadow = true; clear-shadow = true; shadow-radius = 7; shadow-offset-x = -7; shadow-offset-y = -7; shadow-opacity = 0.7; shadow-exclude = [ "name = 'Notification'", "class_g = 'Conky'", "class_g = 'Cairo-clock'", "class_g = 'Xfce4-notifyd'", "class_g = 'Xfce4-power-manager'" ]; # Fading settings fading = true; fade-delta = 4; fade-in-step = 0.03; fade-out-step = 0.03; fade-exclude = [ "_NET_WM_OPACITY@:32a" ]; # Window type settings wintypes: { tooltip = { shadow = false; fade = true; opacity = 0.9; focus = true; }; }; -
Save and close the file.
- Open your i3 configuration file:
nano ~/.config/i3/config - Add the following line to the i3 configuration file to enable Compton:
exec --no-startup-id compton --config ~/.config/compton.conf -
Save and close the file.
- Restart i3 for the changes to take effect:
i3-msg restart
Compton should now be correctly set up in i3.