summaryrefslogtreecommitdiff
path: root/scripts/newemacs
blob: 6b7052c28659b801d4a84cb523d12023c2a27d44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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