diff --git a/tmux/.config/tmux/tmux-sessionizer b/tmux/.config/tmux/tmux-sessionizer new file mode 100755 index 0000000..62b2e63 --- /dev/null +++ b/tmux/.config/tmux/tmux-sessionizer @@ -0,0 +1,12 @@ +#!/usr/bin/bash + +read -p "New session name: " SEL +if [[ -z $SEL ]]; then + echo "No session name specified" + exit 1 +fi +SEL_NAME=$(tr "[:lower:]" "[:upper:]" <<< "$SEL") +WORK_DIR=$(find ~ -not -path "*/.*" -type d -print 2>/dev/null | fzf) + +tmux new-session -d -s "$SEL_NAME" -c "$WORK_DIR" +tmux switch-client -t "$SEL_NAME"