summaryrefslogtreecommitdiffstats
path: root/shell/_emacs/site-lisp/dconf-proxy.el
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2015-04-06 16:41:29 +0200
committerTharre <tharre3@gmail.com>2016-10-07 19:42:55 +0000
commit6c9ecd4bc57a318f9b8663cb476efa2945de716b (patch)
tree8752a60bd59aff898868139a460678f09464dfd9 /shell/_emacs/site-lisp/dconf-proxy.el
parentb76107ee2d8698671a6fa9d732ea86e32f371e2d (diff)
downloaddotfiles-6c9ecd4bc57a318f9b8663cb476efa2945de716b.tar.gz
dotfiles-6c9ecd4bc57a318f9b8663cb476efa2945de716b.tar.xz
dotfiles-6c9ecd4bc57a318f9b8663cb476efa2945de716b.zip
Initial commit, add everything else
Diffstat (limited to 'shell/_emacs/site-lisp/dconf-proxy.el')
-rw-r--r--shell/_emacs/site-lisp/dconf-proxy.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/shell/_emacs/site-lisp/dconf-proxy.el b/shell/_emacs/site-lisp/dconf-proxy.el
new file mode 100644
index 0000000..954852a
--- /dev/null
+++ b/shell/_emacs/site-lisp/dconf-proxy.el
@@ -0,0 +1,14 @@
+(defun refresh-proxy-settings ()
+ (interactive)
+ (if (string= (shell-command-to-string "dconf read /system/proxy/http/enabled") "true\n")
+ (setq url-proxy-services
+ `(("http" .
+ ,(concat
+ (car (split-string-and-unquote ;; split string to remove single quotes and newline
+ (shell-command-to-string "dconf read /system/proxy/http/host") '"'"))
+ ":"
+ (car (split-string-and-unquote ;; split string to remove newline
+ (shell-command-to-string "dconf read /system/proxy/http/port") '"\n"))))))
+ (setq url-proxy-services nil)))
+
+(provide 'dconf-proxy)