Skip to content

Instantly share code, notes, and snippets.

@andreasvirkus
Created July 26, 2015 21:19
Show Gist options
  • Save andreasvirkus/67cd0ec7cfee448f6148 to your computer and use it in GitHub Desktop.
Save andreasvirkus/67cd0ec7cfee448f6148 to your computer and use it in GitHub Desktop.
#!/bin/bash
# proxtog [on/off] | Toggle custom proxy settings on/off
state=$(gsettings get org.gnome.system.proxy mode)
if [ "$1" == 'on' ]; then
gsettings set org.gnome.system.proxy mode 'manual'
echo proxy > on
elif [ "$1" == 'off' ]; then
gsettings set org.gnome.system.proxy mode 'none'
echo proxy > off
fi
state=$(gsettings get org.gnome.system.proxy mode)
echo Current state of proxy: $state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment