在 CentOS 上(通常使用 compton 或它的分支 picom 作为复合器),调整“透明度”一般有两种层面:
下面按常见用法说明。
which compton
which picom
comptonpicom(配置兼容)常见位置:
~/.config/compton.conf
~/.config/picom.conf
如果没有,可以新建:
mkdir -p ~/.config
touch ~/.config/compton.conf
opacity-rule = [
"90:class_g = '.*'"
];
含义:所有窗口 90% 不透明度(10% 透明)
inactive-opacity = 0.8;
active-opacity = 1.0;
例如终端透明:
opacity-rule = [
"85:class_g = 'Alacritty'",
"85:class_g = 'GNOME-terminal'",
"100:class_g = 'firefox'"
];
查看窗口 class:
xprop | grep WM_CLASS
menu-opacity = 0.9;
killall compton
compton --config ~/.config/compton.conf &
或
killall picom
picom --config ~/.config/picom.conf &
可能原因:
检查:
ps aux | grep compton
降低特效:
shadow = false;
blur-background = false;
compton 通常无效,可改用:
gnome-tweak-tool → 透明度(有限)如果你能告诉我:
我可以给你精确配置。