feat: add emacs.service for Emacs server
This commit is contained in:
parent
da99959eb6
commit
6f04d0e9df
1 changed files with 18 additions and 0 deletions
18
emacs/emacs.service
Normal file
18
emacs/emacs.service
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# Emacs server unit service for systemd (start emacs as a server)
|
||||||
|
# This file is meant to be placed into your .config/systemd/user/ folder
|
||||||
|
# and started + enabled with systemctl enable emacs --user --now
|
||||||
|
# It is advised to add an alias for emacs to run it as client
|
||||||
|
# ex. for the terminal version: alias emacs='emacsclient -t'
|
||||||
|
[Unit]
|
||||||
|
Description=Emacs text editor
|
||||||
|
Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
ExecStart=/usr/bin/emacs --daemon
|
||||||
|
ExecStop=/usr/bin/emacsclient --eval "(kill-emacs)"
|
||||||
|
Environment=SSH_AUTH_SOCK=%t/keyring/ssh
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
Loading…
Reference in a new issue