From 98ba0e744bdf99ce0a894451700f11c39dc2579b Mon Sep 17 00:00:00 2001 From: Tharre Date: Mon, 14 Sep 2015 20:19:14 +0200 Subject: emacs: actually install .emacs.d --- shell/_emacs.d/site-lisp/dconf-proxy.el | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 shell/_emacs.d/site-lisp/dconf-proxy.el (limited to 'shell/_emacs.d/site-lisp/dconf-proxy.el') 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) -- cgit v1.2.3-70-g09d2