Skip to content

Instantly share code, notes, and snippets.

@tuxor1337
Created March 9, 2013 00:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuxor1337/5121831 to your computer and use it in GitHub Desktop.
Save tuxor1337/5121831 to your computer and use it in GitHub Desktop.
Toggle (enable/disable) a gnome shell extension's state.
#!/bin/bash
EXT_UUID=$1
function get_ext_state() {
ENABLED_EXT=$(dconf read /org/gnome/shell/enabled-extensions | grep "'$1'")
if [ "x$ENABLED_EXT" != "x" ]; then
return 0
else
return 1
fi
}
if get_ext_state $EXT_UUID; then
gnome-shell-extension-tool -d $EXT_UUID
else
gnome-shell-extension-tool -e $EXT_UUID
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment