This repository has been archived on 2022-03-25. You can view files and clone it, but cannot push or open issues or pull requests.
manjaroConfiguration/installEmojiPicker.sh

32 lines
2.2 KiB
Bash
Raw Normal View History

2021-11-10 21:26:49 +01:00
# On récupère la dernière version de x11-emoji-picker
wget -q https://api.github.com/repos/GaZaTu/x11-emoji-picker/releases/latest
echo "Retrieve the last package..."
grep 'browser_download_url": ".*.deb"' latest | awk '{ print substr ($0, 32 ) }' | awk '{ print substr( $0, 1, length($0)-1 ) }' > url
rm latest
# On télécharge le paquet
wget -q --show-progress -i url -O x11-emoji-picker.deb
rm url
# On installe la dépendance
wget -q --show-progress http://ftp.br.debian.org/debian/pool/main/i/icu/libicu57_57.1-6+deb9u4_amd64.deb
sudo apt install ./libicu57_57.1-6+deb9u4_amd64.deb -y
rm libicu57_57.1-6+deb9u4_amd64.deb
# On l'installe
sudo apt install ./x11-emoji-picker.deb -y
# On le supprime
rm x11-emoji-picker.deb
2021-11-12 14:16:42 +01:00
# On ajoute un raccourci clavier
# 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/']"
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/']"
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' # 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é