Quite natural need but was not implemented by GNOME team. Ok, can do it on our own!
1. Get em' from GConf:
1. Get em' from GConf:
cd `mktemp -d`2. Next, cut off xml garbage:
gconftool-2 --dump /desktop/gnome/keybindings | sed -n '/<key>custom/,/<key>[^c]/ p' > 1
cat 1 | grep '<string' | sed 's|^.*<string>||;s|</string.*$||; s|"|"|g; s|<|<|g;s|>|>|g' > 23. Now take these command/binding/name triplets into the dconf-compatible form:
i=0 ; while read v; do echo "[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom$i]" ; echo command=\'$v\' ; read v ; echo binding=\'$v\' ; read v ; echo name=\'$v\' ; i=$(($i+1)); echo ; done < 2 > 34. Yau! Get it into the dconf!
dconf load / < 35. Now fix the custom-keybindings key in org/gnome/settings-daemon/plugins/media-keys
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings `egrep '^\[' 3 | sed "s|\[|'/|;s|\]|/'|" | tr '\n' , | sed 's|^|[|;s|,$|]|'`That's it!
Комментариев нет:
Отправить комментарий