123456789101112131415161718192021222324252627 |
- [Unit]
- Description=Emacs text editor
- Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/
- [Service]
- Type=notify
- # ExecStart=emacs --fg-daemon
- # ExecStop=emacsclient --eval "(save-buffers-kill-emacs)"
- ExecStart=/home/adam/.local/bin/emacs --fg-daemon
- ExecStop=/home/adam/.local/bin/emacsclient --eval "(save-buffers-kill-emacs)"
- # Emacs will exit with status 15 after having received SIGTERM, which
- # is the default "KillSignal" value systemd uses to stop services.
- SuccessExitStatus=15
- # The location of the SSH auth socket varies by distribution, and some
- # set it from PAM, so don't override by default.
- # Environment=SSH_AUTH_SOCK=%t/keyring/ssh
- Restart=always
- RestartSec=2
- # Post-start notification command (optional)
- ExecStartPost=/usr/bin/notify-send "Emacs Daemon" "Emacs has successfully started."
- [Install]
- WantedBy=default.target
|