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
"restart")
emacsclient --eval "(save-buffers-kill-emacs)" && \
emacs --bg-daemon && \
notify-send "eselect: Restarted server";;
suctl restart emacs && \
notify-send "eselect: Restarted server";;
"stop")
emacsclient --eval "(save-buffers-kill-emacs)" && \
notify-send "eselect: Halted server";;
suctl stop emacs && \
notify-send "eselect: Halted server";;
"new")
notify-send "eselect: Launching Emacs" && \
emacsclient -c -a "emacs";;
notify-send "eselect: Launching Emacs" && \
suctl start emacs && \
emacsclient -c -a "emacs";;
"eshell")
notify-send "eselect: Launching Eshell" && \
emacsclient -c -a "emacs" --eval "(progn (eshell) (delete-other-windows))";;
notify-send "eselect: Launching Eshell" && \
suctl start emacs && \
emacsclient -c -a "emacs" --eval "(progn (eshell) (delete-other-windows))";;
"mail")
notify-send "eselect: Launching notmuch" && \
emacsclient -c -a "emacs" --eval "(progn (notmuch) (delete-other-windows))";;
notify-send "eselect: Launching notmuch" && \
suctl start emacs && \
emacsclient -c -a "emacs" --eval "(progn (notmuch) (delete-other-windows))";;
esac