How compton would be autostarted as a [[Daemon]] process will be dependent on the [[desktop environment]] or [[window manager]] used. For example, for [[Openbox]] the {{ic|~/.config/openbox/autostart}} file must be edited, while for [[i3]] it would be the {{ic|~/.i3/config}} file. Where necessary, compton may also be autostarted from [[xprofile]]. Read the [[startup files]] article for further information.

+

How compton would be autostarted as a [[Daemon]] process will depend on the [[desktop environment]] or [[window manager]] used. For example, for [[Openbox]] the {{ic|~/.config/openbox/autostart}} file must be edited, while for [[i3]] it would be the {{ic|~/.i3/config}} file. Where necessary, compton may also be autostarted from [[xprofile]]. Read the [[startup files]] article for further information.

Installation

Use

Compton may be manually enabled or disabled at any time during a session, or autostarted as a background (Daemon) process for sessions. There are also several optional arguments that may be used to tweak the compositing effects provided. These include:

Many more options are availble, including to set timing, displays to be managed, and the opacity of menus, window borders, and inactive application menus. See the Compton Man Page for further information.

Autostarting

How compton would be autostarted as a Daemon process will depend on the desktop environment or window manager used. For example, for Openbox the ~/.config/openbox/autostart file must be edited, while for i3 it would be the ~/.i3/config file. Where necessary, compton may also be autostarted from xprofile. Read the startup files article for further information.

Command only

To manually enable default compositing effects during a session, use the following command:

$ compton

Alternatively, to disable all shadowing effects during a session, the -C and -G arguments must be added:

$ compton -CGb

To autostart compton as a background (Daemon) process for a session, the -b argument must be used:

compton -b

To disable all shadowing effects from the Daemon process, the -C and -G arguments must again be added:

compton -CGb

Finally, this is an example where additional arguments that require values to be set have been used:

compton -cCGfF -o 0.38 -O 200 -I 200 -t 0 -l 0 -r 3 -D2 -m 0.88

Using a configuration file

To use a custom configuration file with compton during a session, use the following command:

compton --config <path/to/compton.conf>

To autostart compton as a background (Daemon) process for a session, the -b argument must again be used:

compton --config <path/to/compton.conf> -b

It is recommended to either create the configuration file in the hidden .config directory (~/.config/compton.conf) or as a hidden file in the Home directory (~/.compton.conf). A sample script has been provided:

Disable conky shadowing

To disable shadows around conky windows - where used - first amend the conky configuration file ~/.conkyrc as follows:

own_window_class conky

Then amend the compton configuration file as follows:

shadow-exclude = "class_g = 'conky'";

Multihead

If a multihead configuration is used without xinerama - meaning that X server is started with more than one screen - then compton will start on only one screen by default. It can be started on all screens by using the -d argument. For example, compton can be executed for 4 monitors with the following command:

seq 0 3 | xargs -l1 -I@ compton -b -d :0.@

Toubleshooting

The use of compositing effects may on occasion cause issues such as visual glitches when not configured correctly for use with other applications and programs.

Slock

Note: Use of the --focus-exclude argument may be a cleaner solution.

Where inactive window transparancy has been enabled (the -i argument when running as a command), this may provide troublesome results when also using slock. The solution is to amend the transparency to 0.2. For example, where running compton arguments as a command: