Created
March 9, 2013 00:49
-
-
Save tuxor1337/5121831 to your computer and use it in GitHub Desktop.
Toggle (enable/disable) a gnome shell extension's state.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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