在 Debian 上给 Compton(现已多称为 picom) 设置快捷键,通常不是 Compton 自己提供的功能,而是用系统快捷键触发器去启动 / 重启 / 关闭 Compton。下面分几种常见情况说明。
which compton
which picom
下面以 picom 为例(compton 同理)
~/.config/i3/config)bindsym $mod+Shift+c exec --no-startup-id pkill picom && picom &
bindsym $mod+Shift+x exec --no-startup-id pkill picom
重新加载 i3:
i3-msg reload
设置 → 键盘 → 应用程序快捷键
添加:
picomSuper + P关闭:
pkill picom安装:
sudo apt install sxhkd
配置文件 ~/.config/sxhkd/sxhkdrc:
super + shift + c
pkill picom; picom &
super + shift + x
pkill picom
启动:
sxhkd &
比如你有:
~/.config/picom/default.conf~/.config/picom/blur.conf快捷键:
pkill picom; picom --config ~/.config/picom/blur.conf &
exec --no-startup-id picom
设置 → 会话和启动 → 自启程序 → 添加 picom
ps aux | grep picom/usr/bin/picompkill picom
再启动
如果你告诉我:
我可以给你一份精确到可直接复制的配置。