aboutsummaryrefslogtreecommitdiff
path: root/bin/ek
blob: 44203275fdc627200bba7befc226c727fc374051 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env bash

server_running () {
    emacsclient -a "false" -e "(boundp 'server-process)"
}

if [ "t" == "$(server_running)" ]; then
    emacsclient -e '(kill-emacs)'
    echo "Emacs server is killed"
else
    echo "Emacs server is not running"
fi