(Scripts)~use SystemD for eselect
Instead of random calls to emacsclient and emacs, just use systemd to do it for me!
This commit is contained in:
@@ -1,19 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
case "$(printf "new\nstop\nrestart\neshell" | dmenu -p "eserver: ")" in
|
case "$(printf "new\nstop\nrestart\neshell" | dmenu -p "eserver: ")" in
|
||||||
"restart")
|
"restart")
|
||||||
emacsclient -s MAIN --eval "(kill-emacs)";
|
systemctl --user restart emacs;
|
||||||
notify-send "Halted Emacs server";
|
|
||||||
emacs --bg-daemon=MAIN;
|
|
||||||
notify-send "Restarted Emacs server";;
|
notify-send "Restarted Emacs server";;
|
||||||
"stop")
|
"stop")
|
||||||
emacsclient -s MAIN --eval "(kill-emacs)";
|
systemctl --user stop emacs;
|
||||||
notify-send "Halted Emacs server";;
|
notify-send "Halted Emacs server";;
|
||||||
"new")
|
"new")
|
||||||
notify-send "Launching Emacs";
|
notify-send "Launching Emacs";
|
||||||
emacsclient -s MAIN -c -a=emacs;;
|
emacsclient --socket-name=MAIN -c --alternate-editor=emacs;;
|
||||||
"eshell")
|
"eshell")
|
||||||
notify-send "Launching Eshell";
|
notify-send "Launching Eshell";
|
||||||
emacsclient -s MAIN -c -a=emacs --eval '(let ((b (or (get-buffer "*eshell*") (eshell))))
|
emacsclient --socket-name=MAIN -c --alternate-editor=emacs --eval '(let ((b (or (get-buffer "*eshell*") (eshell))))
|
||||||
(switch-to-buffer b))'
|
(switch-to-buffer b))'
|
||||||
esac
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user