Emacs: Update server starting conditions.
This commit is contained in:
parent
9b940e48e8
commit
8a7041d7a8
|
@ -1,6 +1,6 @@
|
|||
;;; server.el --- Set up network stuff.. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2020-11-18T18:34:29+0100>
|
||||
;; Time-stamp: <2020-11-29T10:32:03+0100>
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
@ -33,38 +33,40 @@
|
|||
'tramp-remote-path 'tramp-own-remote-path)) ; Respect remote PATH.
|
||||
) ; unless slow-computer.
|
||||
|
||||
;; Run server if:
|
||||
;; Run server on TCP socket if:
|
||||
;; - Our EUID is not 0,
|
||||
;; - We are not logged in via SSH,
|
||||
;; - It is not already running.
|
||||
(unless (equal (user-real-uid) 0)
|
||||
(unless (getenv "SSH_CONNECTION")
|
||||
(use-package server
|
||||
:defer 2
|
||||
:functions (server-running-p)
|
||||
:init (setq
|
||||
server-use-tcp t
|
||||
server-port 51313
|
||||
server-auth-key ; 64 chars, saved in ~/.emacs.d/server/server.
|
||||
"phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh")
|
||||
:config (unless (eq (server-running-p) t)
|
||||
(server-start)))
|
||||
(when (not (or (equal (user-real-uid) 0)
|
||||
(getenv "SSH_CONNECTION")))
|
||||
(use-package server
|
||||
:defer 2
|
||||
:functions (server-running-p)
|
||||
:init (setq
|
||||
server-use-tcp t
|
||||
server-port 51313
|
||||
server-auth-key ; 64 chars, saved in ~/.emacs.d/server/server.
|
||||
"phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh")
|
||||
:config (unless (eq (server-running-p) t)
|
||||
(server-start)))
|
||||
|
||||
;; Server for Firefox-extension that allows to use Emacs to edit textareas.
|
||||
;; https://addons.mozilla.org/en-US/firefox/addon/ghosttext/
|
||||
(use-package atomic-chrome
|
||||
:defer 2
|
||||
:config (atomic-chrome-start-server)
|
||||
;; “url” is actually the hostname.
|
||||
:custom ((atomic-chrome-url-major-mode-alist
|
||||
'(("^likeable\\.space$" . markdown-mode)
|
||||
("^schlomp\\.space$" . gfm-mode)
|
||||
("^wiki\\.gentoo\\.org$" . mediawiki-mode)
|
||||
("^github\\.com$" . gfm-mode)
|
||||
("^gitlab\\.com$" . gfm-mode)
|
||||
("^gitlab\\.gnome\\.org$" . gfm-mode)))
|
||||
(atomic-chrome-buffer-open-style 'frame))
|
||||
:hook (atomic-chrome-edit-mode . (lambda () (set-fill-column 400))))))
|
||||
;; Server for Firefox-extension that allows to use Emacs to edit textareas.
|
||||
;; https://addons.mozilla.org/en-US/firefox/addon/ghosttext/
|
||||
(use-package atomic-chrome
|
||||
:defer 2
|
||||
:if (or (executable-find "firefox")
|
||||
(executable-find "firefox-bin"))
|
||||
:config (atomic-chrome-start-server)
|
||||
;; “url” is actually the hostname.
|
||||
:custom ((atomic-chrome-url-major-mode-alist
|
||||
'(("^likeable\\.space$" . markdown-mode)
|
||||
("^schlomp\\.space$" . gfm-mode)
|
||||
("^wiki\\.gentoo\\.org$" . mediawiki-mode)
|
||||
("^github\\.com$" . gfm-mode)
|
||||
("^gitlab\\.com$" . gfm-mode)
|
||||
("^gitlab\\.gnome\\.org$" . gfm-mode)))
|
||||
(atomic-chrome-buffer-open-style 'frame))
|
||||
:hook (atomic-chrome-edit-mode . (lambda () (set-fill-column 400)))))
|
||||
|
||||
(provide 'net/server)
|
||||
;;; server.el ends here
|
||||
|
|
Loading…
Reference in New Issue
Block a user