aboutsummaryrefslogtreecommitdiff
path: root/Scripts
diff options
context:
space:
mode:
authordx <aryadevchavali1@gmail.com>2020-06-10 18:09:30 +0100
committerdx <aryadevchavali1@gmail.com>2020-06-10 18:09:30 +0100
commit2c9f6794330fe057c9b27a94dc864bbe80902418 (patch)
treea738c8434d093d76f12c488b4224057e250d8e60 /Scripts
parentc46cb320737eff45482102d799fbcc5c894573c3 (diff)
downloaddotfiles-2c9f6794330fe057c9b27a94dc864bbe80902418.tar.gz
dotfiles-2c9f6794330fe057c9b27a94dc864bbe80902418.tar.bz2
dotfiles-2c9f6794330fe057c9b27a94dc864bbe80902418.zip
+simple eserver script
This will substitute with the systemd server for emacs server, this will hopefully fix some of the issues with persistence.
Diffstat (limited to 'Scripts')
-rwxr-xr-xScripts/.local/scripts/eserver22
1 files changed, 22 insertions, 0 deletions
diff --git a/Scripts/.local/scripts/eserver b/Scripts/.local/scripts/eserver
new file mode 100755
index 0000000..b613bba
--- /dev/null
+++ b/Scripts/.local/scripts/eserver
@@ -0,0 +1,22 @@
+#!/usr/bin/env sh
+
+if [ $1 = "restart" ]
+then
+ eserver stop
+ eserver start
+elif [ $1 = "start" ]
+then
+ if [ -e "/tmp/emacs-server-id" ]
+ then
+ echo "Server running already!"
+ else
+ emacs --bg-daemon=MAIN
+ touch /tmp/emacs-server
+ fi
+elif [ $1 = "stop" ]
+then
+ eserver --eval "(kill-emacs)"
+ rm /tmp/emacs-server
+else
+ emacsclient -s MAIN $@
+fi