aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/alacritty/.local/bin/src
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty/.local/bin/src')
-rwxr-xr-xalacritty/.local/bin/src18
1 files changed, 18 insertions, 0 deletions
diff --git a/alacritty/.local/bin/src b/alacritty/.local/bin/src
new file mode 100755
index 0000000..79c2333
--- /dev/null
+++ b/alacritty/.local/bin/src
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+if [ ! -d "$1" ]; then
+ project="$(
+ projectr -mgE ~/.local/src |
+ fzf --tmux --tac -0 -1 -d/ --with-nth=-1 --preview='lesspipe.sh {}' --query="$1"
+ )"
+ if [ -z "$project" ]; then
+ exit 0
+ fi
+ set -- "$project"
+fi
+
+if [ ! -d "$1" ]; then
+ exit 1
+fi
+
+alacritty msg create-window -T"$(basename "$1")" --working-directory="$1"