以下是Compton在Ubuntu中的使用教程:
打开终端,依次输入以下命令更新系统并安装Compton:
sudo apt update
sudo apt install compton
在终端中输入以下命令创建配置文件:
mkdir -p ~/.config/compton
compton --example-config > ~/.config/compton/compton.conf
用文本编辑器打开配置文件,可修改以下常用选项:
backend:设置后端,如glx或xrender。shadow:控制窗口阴影,设为true或false。opacity:设置窗口透明度,取值0.0到1.0。vsync:控制垂直同步,设为true或false。在终端中输入以下命令手动启动Compton:
compton --config ~/.config/compton/compton.conf -b
若要让Compton随系统启动,可将其添加到桌面环境的启动脚本中,如在i3窗口管理器的~/.config/i3/config文件中添加exec --no-startup-id compton --config ~/.config/compton/compton.conf -b。