如何将键添加到空架构? [关闭]

Modified on: Thu, 14 Jun 2018 08:53:23 +0800

我想自动设置一些设置,特别是为~/.config/dconf/user添加一些键盘快捷键。以下是它在dconf-editor中的外观:


现在gsettings(或dconf)可以列出第一个:

$ gsettings get org.cinnamon.keybindings custom-list
['custom0', 'custom1', 'custom2', 'custom3']

但是,我看不到添加新键绑定的方法,甚至无法读取customX键。

$ gsettings get org.cinnamon.keybindings.custom-keybinding:/ custom0
No such key 'custom0'

如何使用custom4binding='<Super>g' custom4 键>,command='geany'

输出到Donarssons回答:

$ gsettings get org.cinnamon.keybindings.custom-keybindings:/custom0/ binding
No such schema 'org.cinnamon.keybindings.custom-keybindings'
$ gsettings get org.cinnamon.keybindings.custom-keybinding:/custom0/ binding
''

以下命令后的截图。请注意,custom4不会转到自定义键绑定,而是转到根目录。

gsettings set org.cinnamon.keybindings.custom-keybinding:/custom4/ binding '<Super>g'

我正在使用Linux Mint作为我的操作系统。

最佳答案

这是语法错误。这应该有效:

$ gsettings get org.cinnamon.keybindings.custom-keybinding:/org/cinnamon/keybindings/custom-keybindings/custom0/ binding
<Super>e
$ gsettings get org.cinnamon.keybindings.custom-keybinding:/org/cinnamon/keybindings/custom-keybindings/custom0/ command
nemo
$ gsettings get org.cinnamon.keybindings.custom-keybinding:/org/cinnamon/keybindings/custom-keybindings/custom0/ name
nemo

设置新的热键:

$ gsettings set org.cinnamon.keybindings.custom-keybinding:/org/cinnamon/keybindings/custom-keybindings/custom4/ binding '<Super>g' &&
gsettings set org.cinnamon.keybindings.custom-keybinding:/org/cinnamon/keybindings/custom-keybindings/custom4/ command 'geany' &&
gsettings set org.cinnamon.keybindings.custom-keybinding:/org/cinnamon/keybindings/custom-keybindings/custom4/ name 'Geany'
作者:,Donarsson

相关问答

添加新评论