Created
June 3, 2022 18:43
-
-
Save dvtate/9f761219ccb979029d5ae2715572b250 to your computer and use it in GitHub Desktop.
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/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