← 返回命令列表

Linux command

compton 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Start compton

compton

Start with a configuration file

compton --config [~/.config/compton.conf]

Enable shadows

compton -c

Enable fading

compton -f

Set shadow opacity

compton -c -o [0.5]

Disable shadows on dock

compton -c -C

Run in background

compton -b

Enable vsync

compton --vsync opengl

说明

compton is a standalone compositor for X11, providing visual effects like window shadows, transparency, fading animations, and vsync to prevent screen tearing. It works with any window manager that supports compositing. The compositor operates by intercepting window rendering and applying effects before displaying the final image. It supports both XRender and OpenGL backends, with GLX generally providing better performance. Configuration can be done via command-line options or a configuration file. Compton is commonly used with lightweight window managers like i3, openbox, and bspwm to add visual polish without the overhead of a full desktop environment's compositor. It can also help with screen tearing issues on systems without built-in compositing.

参数

-c, --shadow
Enable client-side shadows on windows.
-C, --no-dock-shadow
Disable shadows on dock/panel windows.
-f, --fading
Fade windows in/out when opening/closing.
-o _OPACITY_
Shadow opacity (0.0 to 1.0).
-r _RADIUS_
Shadow blur radius in pixels.
-l _OFFSET_
Left offset for shadows in pixels.
-t _OFFSET_
Top offset for shadows in pixels.
--vsync _METHOD_
VSync method: none, drm, opengl, opengl-oml, opengl-swc.
-b, --daemon
Run as a background daemon.
--config _FILE_
Read configuration from the specified file.
-i _OPACITY_
Inactive window opacity (0.0 to 1.0).
-e _OPACITY_
Opacity of window titlebars and borders.
--backend _BACKEND_
Rendering backend: xrender, glx.

FAQ

What is the compton command used for?

compton is a standalone compositor for X11, providing visual effects like window shadows, transparency, fading animations, and vsync to prevent screen tearing. It works with any window manager that supports compositing. The compositor operates by intercepting window rendering and applying effects before displaying the final image. It supports both XRender and OpenGL backends, with GLX generally providing better performance. Configuration can be done via command-line options or a configuration file. Compton is commonly used with lightweight window managers like i3, openbox, and bspwm to add visual polish without the overhead of a full desktop environment's compositor. It can also help with screen tearing issues on systems without built-in compositing.

How do I run a basic compton example?

Run `compton` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -c, --shadow do in compton?

Enable client-side shadows on windows.