Ubuntu 下为 Compton 配置键盘快捷键
核心原则
快速示例 i3 窗口管理器
# 切换/重开 Compton(若已在运行则先杀进程,再启动)
bindsym $mod+Shift+T exec --no-startup-id killall compton 2>/dev/null; compton --config ~/.config/compton.conf -b
说明:
其他常见桌面环境的做法
# 启动/重开 Compton
"killall compton 2>/dev/null; compton --config ~/.config/compton.conf -b"
m:0x0 + c:108 # 示例按键:右侧 Ctrl 键
# 停止 Compton
"killall compton"
m:0x0 + c:109 # 示例按键:右侧 Shift 键
并在登录自启动中确保执行 xbindkeys(如写入 ~/.xprofile 或会话自启)。实用命令与排错要点