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

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