#!/bin/bash kind="$1" root="$HOME/src/driver" projects=$(find "$root" -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | sort) project=$(echo "$projects" | dmenu -p "Open project:") [ "$?" -eq 0 ] || exit 1 dir=$(realpath "$root/$project") # Rename workspace i3-msg rename workspace to \ "$(i3-msg -t get_workspaces | jq '.[] | select(.focused==true).num'):$project" > /dev/null case "$kind" in intellij|"") idea "$dir" & sakura -d "$dir" & sakura -d "$dir" & ;; *) echo "unknown project kind $kind" exit 1 esac #i3-msg "append_layout ~/layout.json; exec emacsclient --alternate-editor=\"\" --create-frame \"$dir\"; exec gnome-terminal --working-directory=\"$dir\" -x sh -c sbt; exec gnome-terminal --working-directory=\"$dir\""