Skip to content

Instantly share code, notes, and snippets.

@dvtate
Created June 3, 2022 18:43
Show Gist options
  • Save dvtate/9f761219ccb979029d5ae2715572b250 to your computer and use it in GitHub Desktop.
Save dvtate/9f761219ccb979029d5ae2715572b250 to your computer and use it in GitHub Desktop.
#!/bin/sh
# configure the system proxy in gnome settings
gnome_sys_proxy () {
# $1 - 'enable' | 'disable'
# toggle proxy
if [ $1 -eq 'status' ]
then
gsettings get org.gnome.system.proxy mode
elif [ $1 -eq 'enable']
then
gsettings set org.gnome.system.proxy.socks host 127.0.0.1
gsettings set org.gnome.system.proxy.socks port 1080
gsettings set org.gnome.system.proxy mode 'manual'
elif [ $1 -eq 'disable']
then
gsettings set org.gnome.system.proxy mode 'none'
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment