Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Returns the configuration of all Unity custom keyboard shortcuts.
- # Definitions.
- list="org.gnome.settings-daemon.plugins.media-keys custom-keybindings"
- details="org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/"
- # Find the names of all the shortcuts.
- # Won't work if they're not named like "custom0", "custom1", etc.
- customs="$(gsettings get $list | grep -oE "custom"'[0-9]{1,10}')"
- # Errors if there aren't any shortcuts.
- if [[ -z "$customs" ]]; then
- echo "No custom keyboard shortcuts."
- exit 1
- fi
- # Tells you the schema and path of every shortcut.
- echo -n "$list "
- gsettings get $list
- # Returns the configuration of each shortcut.
- for i in $customs; do
- echo
- echo $i
- gsettings list-recursively ${details}${i}/
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement