在 Linux 中,compton(现在很多发行版已改名为 picom)的配置更新方式,主要取决于你是“修改配置文件”还是“重新加载/重启进程”。下面分情况说明。
常见位置:
~/.config/compton.conf
# 或
~/.config/picom.conf
如果你没有配置文件,可以从示例复制:
cp /etc/xdg/compton.conf ~/.config/compton.conf
# 或
cp /usr/share/doc/picom/examples/picom.conf.example ~/.config/picom.conf
用编辑器修改,例如:
nano ~/.config/compton.conf
常见修改项:
pkill compton
compton &
或(picom):
pkill picom
picom &
如果你是用 systemd 启动的:
systemctl --user restart compton
# 或
systemctl --user restart picom
compton --config ~/.config/compton.conf
或:
picom --config ~/.config/picom.conf
⚠️ 注意:
compton / picom 通常不支持热重载配置,修改后一般需要重启进程。
如果你用:
可以在配置里写:
exec --no-startup-id compton
或:
picom &
修改配置后,重新加载 WM 即可。
查看进程:
ps aux | grep compton
# 或
ps aux | grep picom
查看日志(排错):
picom --log-level debug
建议新系统直接使用:
picom
如果你愿意,可以告诉我:
我可以给你一份可直接用的配置示例。