summaryrefslogtreecommitdiff
path: root/scripts/newemacs
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/newemacs')
-rwxr-xr-xscripts/newemacs14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/newemacs b/scripts/newemacs
new file mode 100755
index 0000000..6b7052c
--- /dev/null
+++ b/scripts/newemacs
@@ -0,0 +1,14 @@
+#!/bin/sh
+project_name=$(swenu -coil 10 -p "New Workspace:")
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+
+project_path=$(getprojects | swenu -coil 10 -p "Directory:" -s "$project_name")
+
+emacs --daemon="$project_name"
+if [ -z "$project_path" ]; then
+ emacsclient -c -s "$project_name"
+else
+ emacsclient -c -s "$project_name" -e "(dired \"$project_path\")"
+fi