Fix erasing old custom keyboard shortcuts
This commit is contained in:
parent
d34f90eb7a
commit
3fd4456614
1 changed files with 14 additions and 4 deletions
|
@ -16,8 +16,18 @@ sudo apt install ./x11-emoji-picker.deb -y
|
|||
rm x11-emoji-picker.deb
|
||||
|
||||
# On ajoute un raccourci clavier
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/']"
|
||||
# On récupère la liste des raccourcis personnalisés
|
||||
CUSTOM_KEYBINDINGS_LIST=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
|
||||
if [[ $CUSTOM_KEYBINDINGS_LIST == "@as []" ]] # Si il y en a pas on créer construit notre liste
|
||||
then
|
||||
CUSTOM_KEYBINDINGS_LIST="['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/']"
|
||||
echo $CUSTOM_KEYBINDINGS_LIST
|
||||
else # Si il y en a déjà on rajoute un élément à la liste
|
||||
CUSTOM_KEYBINDINGS_LIST="${CUSTOM_KEYBINDINGS_LIST::-1}, '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/']"
|
||||
echo $CUSTOM_KEYBINDINGS_LIST
|
||||
fi
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "$CUSTOM_KEYBINDINGS_LIST" # On met à jour la liste
|
||||
# On le nomme
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/ name "'Emoji Picker'"
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/ binding "'<Super>semicolon'"
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/ command "'emoji-picker'"
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/ name 'Emoji Picker' # On définit le nom de l'élément qu'on a rajouté
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/ command 'emoji-picker' # On définit la commande de l'élément qu'on a rajouté
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/ binding '<Super>semicolon' # On définit le raccourci de l'élément qu'on a rajouté
|
||||
|
|
Reference in a new issue