Linux Compton 快捷键设置指南
核心原则
i3 与 Sway 的设置方法
# i3 或 Sway 均可使用(Sway 配置路径通常为 ~/.config/sway/config)
bindsym $mod+Shift+t exec --no-startup-id killall compton 2>/dev/null || compton --config ~/.config/compton.conf --backend glx --alpha-threshold 1 --opacity 0.5
i3-msg reload。swaymsg reload。Awesome WM 的设置方法
-- 需先在系统安装并启用 compton(作为常驻合成器时更常见)
awful.key({ "Mod1" }, "t", function ()
awful.spawn.with_shell("killall compton 2>/dev/null || compton --config ~/.config/compton.conf")
end, {description = "toggle compton", group = "launcher"}),
awesome-client 'awesome.restart()' 或重启会话生效。实用命令与排错要点
compton --config ~/.config/compton.conf --backend glx --alpha-threshold 1 --opacity 0.5killall compton 2>/dev/null || compton --config ~/.config/compton.confsystemctl --user restart compton 来应用变更;在快捷键里 killall 可能不会影响 systemd 管理的进程,需按你的服务配置选择重载或重启方式。