31 lines
2.6 KiB
Bash
31 lines
2.6 KiB
Bash
# --> Nautilus <--
|
|
# Fetching customs keyboard shortcuts
|
|
CUSTOM_KEYBINDINGS_LIST=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
|
|
if [[ $CUSTOM_KEYBINDINGS_LIST == "@as []" ]] # Creating new list if not exists
|
|
then
|
|
CUSTOM_KEYBINDINGS_LIST="['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/']"
|
|
else # If already existing, adding our new element
|
|
CUSTOM_KEYBINDINGS_LIST="${CUSTOM_KEYBINDINGS_LIST::-1}, '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/']"
|
|
fi
|
|
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "$CUSTOM_KEYBINDINGS_LIST" # Updating the list
|
|
# Naming it
|
|
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/ name 'Nautilus' # Set name
|
|
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/ command 'nautilus -w' # Set command
|
|
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/ binding '<Super>E' # Set shortcut
|
|
echo -e "\nNautilus shortcut added (Super+E)! 🎉"
|
|
|
|
# --> Flameshot <--
|
|
# Fetching customs keyboard shortcuts
|
|
CUSTOM_KEYBINDINGS_LIST=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
|
|
if [[ $CUSTOM_KEYBINDINGS_LIST == "@as []" ]] # Creating new list if not exists
|
|
then
|
|
CUSTOM_KEYBINDINGS_LIST="['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-shortcut/']"
|
|
else # If already existing, adding our new element
|
|
CUSTOM_KEYBINDINGS_LIST="${CUSTOM_KEYBINDINGS_LIST::-1}, '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-shortcut/']"
|
|
fi
|
|
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "$CUSTOM_KEYBINDINGS_LIST" # Updating the list
|
|
# Naming it
|
|
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-shortcut/ name 'Flameshot' # Set name
|
|
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-shortcut/ command 'flameshot gui' # Set command
|
|
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-shortcut/ binding 'Print' # Set shortcut
|
|
echo -e "\nFlameshot shortcut added (ImprEcran key)! 🎉"
|