태그 보관물: gsettings

gsettings

빈 스키마에 키를 추가하는 방법은 무엇입니까? [닫은]

일부 설정을 자동화하고 싶습니다. 특히 키보드 단축키를 추가하십시오 ~/.config/dconf/user. 다음은 dconf-editor에서 어떻게 보이는지입니다.

org.cinnamon.keybindings

이제 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'

어떻게 예를 들어, 추가 할 수 있습니다 custom4와 키를 binding='<Super>g', command='geany', name='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를 O / S로 사용하고 있습니다.



답변

구문 오류입니다. 이것은 작동해야합니다 :

$ 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'

답변