Manjaro Difference between revisions of "Using Compton for a tear-free experience in Xfce"

Difference between revisions of "Using Compton for a tear-free experience in Xfce"

From Manjaro
(Marked this version for translation)
(implemented templates and updated links)
Line 5: Line 5:
People who are experiencing screen tearing in Xfce can try out the following method.
People who are experiencing screen tearing in Xfce can try out the following method.


= Installing compton = <!--T:2-->
Compton has been replaced by Picom
Compton is an X compositor which supports xrender and glx (opengl) backends.
 
= Installing picom = <!--T:2-->
Picom - is an X compositor which supports xrender and glx (opengl) backends.


<!--T:3-->
<!--T:3-->
To install it from the command line:
To install it from the command line:
sudo pacman -S compton
{{UserCmd|command=sudo pacman -S picom}}


= Configuring compton = <!--T:4-->
= Configuring compton = <!--T:4-->
Compton can be configured by editing ''~/.config/compton.conf'' or ''~/.config/compton/compton.conf'', the latter location is now recommended.
Picom is configured by editing ''~/.config/picom/picom.conf''.


<!--T:5-->
<!--T:5-->
The following are some commonly used options:
The following are some commonly used options:
backend = "glx";
{{File|file=~/.config/picom/picom.conf|content=
glx-no-stencil = true;
<pre>
vsync = true;
backend = "glx";
unredir-if-possible = true;
glx-no-stencil = true;
vsync = true;
unredir-if-possible = true;
   
   
# Shadow
# Shadow
shadow = true; # Enabled client-side shadows on windows.
shadow = true; # Enabled client-side shadows on windows.
shadow-radius = 7; # The blur radius for shadows. (default 12)
shadow-radius = 7; # The blur radius for shadows. (default 12)
shadow-offset-x = -7; # The left offset for shadows. (default -15)
shadow-offset-x = -7; # The left offset for shadows. (default -15)
shadow-offset-y = -7; # The top offset for shadows. (default -15)
shadow-offset-y = -7; # The top offset for shadows. (default -15)
shadow-exclude = [
shadow-exclude = [
   "n:e:Notification",
   "n:e:Notification",
   "n:e:Docky",
   "n:e:Docky",
Line 40: Line 44:
   "class_g ?= 'Notify-osd'",
   "class_g ?= 'Notify-osd'",
   "_GTK_FRAME_EXTENTS@:c"
   "_GTK_FRAME_EXTENTS@:c"
];
];
   
   
# Opacity
# Opacity
detect-client-opacity = true;
detect-client-opacity = true;
   
   
# Window type settings
# Window type settings
wintypes:
wintypes:
{
{
   dock = { shadow = false; };
   dock = { shadow = false; };
   dnd = { shadow = false; };
   dnd = { shadow = false; };
   tooltip = { shadow = false; };
   tooltip = { shadow = false; };
  };
  };
</pre>
}}


= Disabling xfwm4 compositor and enabling compton = <!--T:6-->
= Disabling xfwm4 compositor and enabling picom = <!--T:6-->
The following command can be used to turn off xfwm4's compositing feature:
The following command can be used to turn off xfwm4's compositing feature:
xfconf-query -c xfwm4 -p /general/use_compositing -s false
 
{{UserCmd|command=xfconf-query -c xfwm4 -p /general/use_compositing -s false}}


<!--T:7-->
<!--T:7-->
The following content can be pasted in ''~/.config/autostart/compton.desktop''
Create a new file ''~/.config/autostart/picom.desktop'' with content
{{File|file=~/.config/autostart/picom.desktop|content=
<pre>
  [Desktop Entry]
  [Desktop Entry]
  Encoding=UTF-8
  Encoding=UTF-8
Line 70: Line 79:
  Terminal=false
  Terminal=false
  Hidden=false
  Hidden=false
</pre>
}}


<!--T:8-->
<!--T:8-->
Now one could logout and login again to see if compton has been activated.
Now one could logout and login again to see if picom has been activated.


<!--T:9-->
<!--T:9-->
To check if compton is working following command can be used:
To check if compton is working following command can be used:
pgrep -l compton
{{UserCmd|command=pgrep -l picom}}


= Links = <!--T:10-->
= Links = <!--T:10-->


<!--T:11-->
<!--T:11-->
*https://classicforum.manjaro.org/index.php?topic=19857.0
* https://wiki.archlinux.org/title/Picom
*http://ubuntuforums.org/showthread.php?t=2144468&p=12644745#post12644745
* https://github.com/yshui/picom
*https://wiki.archlinux.org/index.php/Compton
*https://github.com/chjj/compton
</translate>
</translate>
[[Category:Contents Page{{#translation:}}]]
[[Category:Contents Page{{#translation:}}]]

Revision as of 10:02, 9 December 2022

Other languages:
English • ‎Türkçe • ‎русский

People who are experiencing screen tearing in Xfce can try out the following method.

Compton has been replaced by Picom

Installing picom

Picom - is an X compositor which supports xrender and glx (opengl) backends.

To install it from the command line:

user $ sudo pacman -S picom COPY TO CLIPBOARD


Configuring compton

Picom is configured by editing ~/.config/picom/picom.conf.

The following are some commonly used options:

~/.config/picom/picom.conf
backend = "glx";
glx-no-stencil = true;
vsync = true;
unredir-if-possible = true;
 
# Shadow
shadow = true; # Enabled client-side shadows on windows.
shadow-radius = 7; # The blur radius for shadows. (default 12)
shadow-offset-x = -7; # The left offset for shadows. (default -15)
shadow-offset-y = -7; # The top offset for shadows. (default -15)
shadow-exclude = [
  "n:e:Notification",
  "n:e:Docky",
  "g:e:Synapse",
  "g:e:Conky",
  "n:w:*Firefox*",
  "n:w:*Chromium*",
  "n:w:*dockbarx*",
  "class_g ?= 'Cairo-dock'",
  "class_g ?= 'Xfce4-notifyd'",
  "class_g ?= 'Xfce4-power-manager'",
  "class_g ?= 'Notify-osd'",
  "_GTK_FRAME_EXTENTS@:c"
];
 
# Opacity
detect-client-opacity = true;
 
# Window type settings
wintypes:
{
  dock = { shadow = false; };
  dnd = { shadow = false; };
  tooltip = { shadow = false; };
 };

Disabling xfwm4 compositor and enabling picom

The following command can be used to turn off xfwm4's compositing feature:

user $ xfconf-query -c xfwm4 -p /general/use_compositing -s false COPY TO CLIPBOARD


Create a new file ~/.config/autostart/picom.desktop with content

~/.config/autostart/picom.desktop
 [Desktop Entry]
 Encoding=UTF-8
 Version=0.9.4
 Type=Application
 Name=Compton
 Comment=X11 compositor
 Exec=compton -b
 OnlyShowIn=XFCE;
 StartupNotify=false
 Terminal=false
 Hidden=false

Now one could logout and login again to see if picom has been activated.

To check if compton is working following command can be used:

user $ pgrep -l picom COPY TO CLIPBOARD


Links

Cookies help us deliver our services. By using our services, you agree to our use of cookies.