Add project bind to select ~/Projects

This commit is contained in:
2025-08-19 15:28:03 +01:00
parent aa9ff89aa5
commit e3dd81ed15
2 changed files with 22 additions and 0 deletions

20
project.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -e
projects=()
# Get list of projects from ~/Projects
for dir in $HOME/Projects/**/*; do
if [ -d $dir ]; then
projects+=(${dir#$HOME/Projects/})
fi
done
project=$(
echo "${projects[@]}" | tr ' ' '\n' | sort -u |
fzf --layout=reverse --info=hidden --border=rounded --cycle
)
tmux new-window -n $project -c ~/Projects/$project
~/.local/share/tmux/layouts/window-auto