您尚未登录。

#1 2021-05-16 23:51:50

zw963
会员
注册时间: 2018-09-18
帖子: 7

在命令行中, 通过脚本的方式批量为 GNOME 设置快捷键.

不废话, 直接贴代码.

创建一个配置文件, 叫做 gnome_custom_keybinding.ini

[org/gnome/settings-daemon/plugins/media-keys]
custom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/','/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/']


[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0]
binding='<Primary><Alt>q'
command='flameshot gui '
name=' flameshot'

[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1]
binding='<Primary><Alt>t'
command='telegram-desktop '
name=' telegram'

加载配置文件.

cat gnome_custom_keybiding.ini | dconf load '/'

然后就立即可用了.

离线

页脚