aboutsummaryrefslogtreecommitdiff
path: root/Scripts/.local/scripts/eselect
blob: d086b7ea14c013aec63860cc5560597ce143f6f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

case "$(printf "new\nstop\nrestart\neshell" | dmenu -p "eserver: ")" in
    "restart")
        systemctl --user restart emacs;
        notify-send "Restarted Emacs server";;
    "stop")
        systemctl --user stop emacs;
        notify-send "Halted Emacs server";;
    "new")
        notify-send "Launching Emacs";
        emacsclient -c --alternate-editor=emacs;;
    "eshell")
        notify-send "Launching Eshell";
        emacsclient -c --alternate-editor=emacs --eval '(let ((b (or (get-buffer "*eshell*") (eshell)))) (switch-to-buffer b))';;
esac