Compton本身不直接提供快捷键设置功能,需通过窗口管理器或相关工具间接设置,以下是不同桌面环境的设置方法:
dconf-editor,打开后导航到org->gnome->settings-daemon->plugins->media-keys->custom-keybindings,点击右侧“+”添加自定义快捷键,填写名称、命令和绑定。也可通过GNOME Tweaks工具,在“Extensions”中找到“Compton”扩展进行设置(若有)。~/.i3/config文件,添加如bindsym $mod+Shift+T exec --no-startup-id compton --config /path/to/your/compton.conf --opacity 0.5的代码来设置快捷键($mod替换为实际修饰键)。bindsym(i3)、keybind(sway)等命令来实现。