aboutsummaryrefslogtreecommitdiff
path: root/bin/ek
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ek')
-rwxr-xr-xbin/ek12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/ek b/bin/ek
new file mode 100755
index 0000000..4420327
--- /dev/null
+++ b/bin/ek
@@ -0,0 +1,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