aboutsummaryrefslogtreecommitdiffstats
path: root/systemd/emacs.service
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--systemd/emacs.service13
1 files changed, 13 insertions, 0 deletions
diff --git a/systemd/emacs.service b/systemd/emacs.service
new file mode 100644
index 0000000..d228c89
--- /dev/null
+++ b/systemd/emacs.service
@@ -0,0 +1,13 @@
+[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 \ No newline at end of file