你问的 Compton 一般是指 Linux 下常用的 X11 合成管理器(compositor),用来实现窗口透明、阴影、动画等效果。下面是启动和配置方法。
不同发行版安装命令:
# Debian / Ubuntu
sudo apt install compton
# Arch / Manjaro
sudo pacman -S compton
# Fedora
sudo dnf install compton
注意:新版本很多发行版已改名为 picom(compton 的 fork)
sudo apt install picom
compton &
或(picom):
picom &
此时窗口特效会立即生效。
~/.xinitrc(startx 用户)在 ~/.xinitrc 里加:
compton &
exec dwm # 或 i3 / openbox 等
放到 autostart:
在 ~/.config/i3/config:
exec --no-startup-id compton
~/.config/openbox/autostart
compton &
mkdir -p ~/.config/autostart
创建:
~/.config/autostart/compton.desktop
内容:
[Desktop Entry]
Type=Application
Name=Compton
Exec=compton
X-GNOME-Autostart-enabled=true
~/.config/compton.conf
示例(基础):
backend = "glx";
shadow = true;
fade = true;
opacity-rule = [
"90:class_g = 'URxvt'"
];
启动指定配置:
compton --config ~/.config/compton.conf
ps aux | grep compton
如果你告诉我:
我可以给你更精确的启动方式。