在 Linux 系統中配置 Compton 窗口合成器可以幫助你獲得更好的窗口透明度和視覺效果。以下是詳細的配置步驟:
在基于 Debian 的發行版(如 Ubuntu)中,使用以下命令安裝 Compton:
sudo apt-get install compton
在基于 Arch 的發行版中,使用以下命令安裝 Compton:
sudo pacman -S compton
找到配置文件:
/.config/compton.conf
。如果文件不存在,可以創建一個。touch /.config/compton.conf
nano /.config/compton.conf
常用配置選項:
-b
:啟用背景模糊。bg_blur true
-r
:啟用陰影。shadow true
-s
:啟用屏幕邊緣模糊。screen_edge_blur true
-c
:禁用窗口透明。opacity false
--vsync
:啟用垂直同步。vsync true
--ignore-glx-glitz
:忽略 OpenGL 加速。ignore_glx_glitz true
保存并關閉配置文件。
在基于 Debian 和 Ubuntu 的系統中,使用以下命令重啟 Compton 服務:
sudo systemctl restart compton
在基于 Fedora 和 RHEL 的系統中,使用以下命令重啟 Compton 服務:
sudo systemctl restart compton.service
現在,Compton 應該已經根據您的設置運行了。您可以根據需要調整配置文件中的選項,以達到最佳的視覺效果和性能。