The nice thing I discovered today is that it's highly tighted to the whole system, and if you just m-x shell when you're in a file opened through tramp, it'll open a shell in the remote system.
Super nice.
Technical stuff, mostly
(setq browse-url-browser-function 'browse-url-generic
browse-url-generic-program "chromium-browser")
(defun is-proc-opened (procname) | |
(let ((procs (list-system-processes))) | |
(remove-if-not (lambda (proc) | |
(search procname | |
(name-of-proccess proc))) | |
procs))) | |
(defun name-of-process (proc) | |
(cdr (car (process-attributes proc)))) | |
(defun browse-url-open-browser (url &rest new-window) | |
(setq browse-url-generic-program (open-browser)) | |
(apply 'browse-url-generic url new-window)) | |
(defun open-browser () | |
"define the priorities of browsers" | |
(if (is-proc-opened "chromium") | |
"chromium-browser" | |
(if (is-proc-opened "firefox") | |
"firefox" | |
"chromium-browser"))) | |
(setq browse-url-browser-function 'browse-url-open-browser) |