要提升CentOS系统中Compton配置效果,可以参考以下步骤和建议进行优化和调整:
sudo yum update -y
sudo yum install compton -y
sudo yum install snapd -y
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap
sudo snap install compton --classic
~/.config/compton.conf
。如果该文件不存在,可以手动创建一个。nano ~/.config/compton.conf
backend = "glx";
glx-no-stencil = true;
glx-copy-from-front = true;
glx-shm-config = "size=1024M";
glx-vsync = false;
shadow-exclude = "[class='GtkWindow']";
fade = true;
opacity-rule = [ "opacity=0.5; class_g='GtkPanel'", "opacity=0.75; class_g='GtkStatusbar'" ];
compton -c ~/.config/compton.conf
/etc/systemd/system/compton.service
,并添加以下内容:[Unit]
Description=Compton Window Composer
After=display-manager.service
[Service]
ExecStart=/usr/bin/compton -c ~/.config/compton.conf
Restart=on-failure
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable compton.service
sudo systemctl start compton.service
ps aux | grep compton
glx
性能更好,但需要OpenGL支持。cache-size = 1024M
timer-age = 3600
shadow = false
overlap = 10
keybind = "Super+Shift+F"
log-file = "/var/log/compton.log"
通过以上步骤和建议,你应该能够在CentOS系统中成功配置并优化Compton,以获得更好的窗口管理体验和视觉效果。如果有任何问题,请检查日志文件或参考Compton的官方文档。