aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/menu-projects16
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/menu-projects b/bin/menu-projects
new file mode 100755
index 0000000..6d529f5
--- /dev/null
+++ b/bin/menu-projects
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# Looks only for directories with a git repo attached to it
+project=$({ for p in $HOME/src/*/.git ;do
+ basename `dirname $p`
+ done } | bemenu -i -s -c -l 20 -W 0.5 -p 'Project:')
+
+# cd into the project directory to load manifests, if available, and start Emacs from there
+cd $HOME/src/$project
+if [ -f manifest.scm ]; then
+ guix shell -m manifest.scm -- emacs .
+elif [ -f .manifest.scm ]; then
+ guix shell -m .manifest.scm -- emacs .
+else
+ emacs .
+fi