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/createKeyboardsShortcut.sh

31 lines
2.5 KiB
Bash
Raw Normal View History

# --> Nautilus <--
2021-11-14 00:44:24 +01:00
# Fetching customs keyboard shortcuts
CUSTOM_KEYBINDINGS_LIST=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
2021-11-14 00:44:24 +01:00
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/']"
2021-11-14 00:44:24 +01:00
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
2021-11-14 00:44:24 +01:00
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 shortcut' # Set name
2021-12-09 14:36:42 +01:00
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
2021-11-14 00:44:24 +01:00
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
# --> Flameshot <--
2021-11-14 00:44:24 +01:00
# Fetching customs keyboard shortcuts
CUSTOM_KEYBINDINGS_LIST=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
2021-11-14 00:44:24 +01:00
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/']"
2021-11-14 00:44:24 +01:00
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
2021-11-14 00:44:24 +01:00
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 shortcut' # 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