Files
dotfiles/Scripts/.local/scripts/eselect
Aryadev Chavali 250c63ac4b (Scripts)+eshell option to eselect
Option makes it easier to launch eshell instantly, which I've found to
be doing quite often.
2020-12-02 15:31:23 +00:00

20 lines
703 B
Bash
Executable File

#!/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