summaryrefslogtreecommitdiffstats
path: root/.emacs.d/site-lisp/dconf-proxy.el
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2016-10-07 20:53:06 +0000
committerTharre <tharre3@gmail.com>2016-10-16 15:23:59 +0000
commitedbcca8cd2b93b8c88eb62c431d04ea832b73180 (patch)
treebac188c0ee4c1c214dd50568e70783a7ee2c3565 /.emacs.d/site-lisp/dconf-proxy.el
parentd4f1a0f27100ff2f4380fa4cf38b09e7f0c051f7 (diff)
downloaddotfiles-edbcca8cd2b93b8c88eb62c431d04ea832b73180.tar.gz
dotfiles-edbcca8cd2b93b8c88eb62c431d04ea832b73180.tar.xz
dotfiles-edbcca8cd2b93b8c88eb62c431d04ea832b73180.zip
Reorganise dotfiles
Diffstat (limited to '.emacs.d/site-lisp/dconf-proxy.el')
-rw-r--r--.emacs.d/site-lisp/dconf-proxy.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/.emacs.d/site-lisp/dconf-proxy.el b/.emacs.d/site-lisp/dconf-proxy.el
new file mode 100644
index 0000000..954852a
--- /dev/null
+++ b/.emacs.d/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)