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