eselect: use the Emacs systemd service instead of a random bg-daemon

This commit is contained in:
2025-11-04 16:38:51 +00:00
parent 0fb4a59372
commit fe0c756636

View File

@@ -3,18 +3,22 @@
case "$(printf "new\nstop\nrestart\neshell\nmail" | dmenu -p "eserver: ")" in case "$(printf "new\nstop\nrestart\neshell\nmail" | dmenu -p "eserver: ")" in
"restart") "restart")
emacsclient --eval "(save-buffers-kill-emacs)" && \ emacsclient --eval "(save-buffers-kill-emacs)" && \
emacs --bg-daemon && \ suctl restart emacs && \
notify-send "eselect: Restarted server";; notify-send "eselect: Restarted server";;
"stop") "stop")
emacsclient --eval "(save-buffers-kill-emacs)" && \ emacsclient --eval "(save-buffers-kill-emacs)" && \
notify-send "eselect: Halted server";; suctl stop emacs && \
notify-send "eselect: Halted server";;
"new") "new")
notify-send "eselect: Launching Emacs" && \ notify-send "eselect: Launching Emacs" && \
emacsclient -c -a "emacs";; suctl start emacs && \
emacsclient -c -a "emacs";;
"eshell") "eshell")
notify-send "eselect: Launching Eshell" && \ notify-send "eselect: Launching Eshell" && \
emacsclient -c -a "emacs" --eval "(progn (eshell) (delete-other-windows))";; suctl start emacs && \
emacsclient -c -a "emacs" --eval "(progn (eshell) (delete-other-windows))";;
"mail") "mail")
notify-send "eselect: Launching notmuch" && \ notify-send "eselect: Launching notmuch" && \
emacsclient -c -a "emacs" --eval "(progn (notmuch) (delete-other-windows))";; suctl start emacs && \
emacsclient -c -a "emacs" --eval "(progn (notmuch) (delete-other-windows))";;
esac esac