summaryrefslogtreecommitdiffstats
path: root/shell/_emacs.d/site-lisp/dconf-proxy.el
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2015-09-14 20:19:14 +0200
committerTharre <tharre3@gmail.com>2016-10-07 20:13:36 +0000
commit98ba0e744bdf99ce0a894451700f11c39dc2579b (patch)
tree0586076ab8c7f3acde1bfef4375e6d4bdcd76003 /shell/_emacs.d/site-lisp/dconf-proxy.el
parent71a55046a49ea4f340638fc989fbad1a6b001ca7 (diff)
downloaddotfiles-98ba0e744bdf99ce0a894451700f11c39dc2579b.tar.gz
dotfiles-98ba0e744bdf99ce0a894451700f11c39dc2579b.tar.xz
dotfiles-98ba0e744bdf99ce0a894451700f11c39dc2579b.zip
emacs: actually install .emacs.d
Diffstat (limited to 'shell/_emacs.d/site-lisp/dconf-proxy.el')
-rw-r--r--shell/_emacs.d/site-lisp/dconf-proxy.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/shell/_emacs.d/site-lisp/dconf-proxy.el b/shell/_emacs.d/site-lisp/dconf-proxy.el
new file mode 100644
index 0000000..954852a
--- /dev/null
+++ b/shell/_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)