#!/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:') if [ -z $project ]; then # Allows cancelling selection exit 1 fi # 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