在 Linux 中,compton(现在很多发行版已改名 picom)本身不是一个 systemd 服务,通常是一个用户进程,所以“重启”一般是:杀掉进程 → 重新启动。
下面按常见情况说明:
# 杀掉 compton
pkill compton
# 重新启动 compton(后台运行)
compton &
如果你用的是 picom(新版本):
pkill picom
picom &
假设配置在 ~/.config/compton.conf:
pkill compton
compton --config ~/.config/compton.conf &
picom 同理:
pkill picom
picom --config ~/.config/picom.conf &
在 ~/.config/i3/config 中通常有:
exec --no-startup-id compton
修改配置后:
pkill compton
compton &
或重启 i3(会重新拉起):
i3-msg restart
查看是否有:
systemctl --user status compton
如果有:
systemctl --user restart compton
(picom 同理)
ps aux | grep compton
或
pgrep compton
pkill -9 compton
~/.config/compton.conf~/.compton.confwhich picom
如果你愿意,可以告诉我:
我可以给你一条完全适合你环境的命令。