This repository has been archived on 2022-12-11. You can view files and clone it, but cannot push or open issues or pull requests.
dot-files/.config/systemd/user/emacs.service
Collin J. Doering cff91a9110 Pass environment variables from shell to systemd
Instead of having the systemd user units in .config/systemd/user/ who's
programs require access to a environment variable to define them
explicitly using "Environment = 'VAR=value'". Instead from .bashrc and
.zshrc we can import all environment variables using "systemctl --user
import-environment" or import variables individually like so "systemctl
--user import-environment VAR_NAME".

Here I import (using the method above) both $PATH and $SMLNJ_HOME so
that they can be used by emacs (and maybe some other
program/systemd-user-unit I have forgotten).

Signed-off-by: Collin J. Doering <rekahsoft@gmail.com>
2015-01-14 05:12:43 -05:00

12 lines
279 B
Desktop File

[Unit]
Description = Emacs: the extensible, self-documenting text editor
[Service]
Type = forking
ExecStart = /usr/bin/emacs --daemon
ExecStop = /usr/bin/emacsclient --eval "(progn (setq kill-emacs-hook 'nil) (kill-emacs))"
Restart = always
[Install]
WantedBy = default.target