diff options
Diffstat (limited to 'scripts/sessions')
| -rwxr-xr-x | scripts/sessions/project.sh | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/scripts/sessions/project.sh b/scripts/sessions/project.sh index ffe9cc9..f642a9e 100755 --- a/scripts/sessions/project.sh +++ b/scripts/sessions/project.sh @@ -2,10 +2,19 @@ dir="$1"; -sensible-terminal -d "$dir" -e sensible-editor . & +editor="sensible-editor"; + +if [[ -f "$dir/default.nix" ]]; then + editor="nix-shell --run '$editor'"; +fi; + +term() { sensible-terminal -d "$dir" "$@"; } +editor() { term -e sh -c "echo 'Loading...'; $editor"; } + +editor & sleep 0.1; -sensible-terminal -d "$dir" & -sensible-terminal -d "$dir" & +term & +term & disown; |
