blob: fb8f515788fb792bb24abf59d4aab4aec448dcce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/bash
case "$(printf "new\nstop\nrestart\neshell" | dmenu -p "eserver: ")" in
"restart")
emacsclient -s MAIN --eval "(kill-emacs)";
notify-send "Halted Emacs server";
emacs --bg-daemon=MAIN;
notify-send "Restarted Emacs server";;
"stop")
emacsclient -s MAIN --eval "(kill-emacs)";
notify-send "Halted Emacs server";;
"new")
notify-send "Launching Emacs";
emacsclient -s MAIN -c -a=emacs;;
"eshell")
notify-send "Launching Eshell";
emacsclient -s MAIN -c -a=emacs --eval '(let ((b (or (get-buffer "*eshell*") (eshell))))
(switch-to-buffer b))'
esac
|