-rwxr-xr-x new-cc-session.sh
1 #!/usr/bin/env bash 2 3 title="$@" 4 5 # prompt for title interactively if not passed as an arg (used by zellij keybinding) 6 if [[ -z "$title" ]]; then 7 printf "Title: " 8 read title 9 [[ -z "$title" ]] && exit 1 10 fi 11 12 ctx_id=$(uuidgen | tr '[:upper:]' '[:lower:]' | cut -c1-8) 13 14 #exec alacritty msg create-window \ 15 # --working-directory ~/git \ 16 # --command /bin/zsh -c \ 17 # '/opt/homebrew/bin/tmux new-session -s "'"$title"'" -e CLAUDE_CONTEXT_ID='"$ctx_id"' \; split-window -h "/opt/homebrew/bin/claude --dangerously-skip-permissions; zsh" \; select-pane -t 1' 18 19 # Rio can't launch in new tab 20 #exec rio \ 21 # --working-dir ~/git \ 22 # --title-placeholder "$title" \ 23 # --command /bin/zsh -c \ 24 # '/opt/homebrew/bin/tmux new-session -s "'"$title"'" -e CLAUDE_CONTEXT_ID='"$ctx_id"' \; split-window -h "/opt/homebrew/bin/claude --dangerously-skip-permissions; zsh" \; select-pane -t 1' 25 26 #exec wezterm start \ 27 # --cwd ~/git \ 28 # --new-tab \ 29 # /bin/zsh -c \ 30 # '/opt/homebrew/bin/tmux new-session -s "'"$title"'" -e CLAUDE_CONTEXT_ID='"$ctx_id"' \; split-window -h "/opt/homebrew/bin/claude --dangerously-skip-permissions; zsh" \; select-pane -t 1' 31 32 exec wezterm start \ 33 --cwd ~/git \ 34 --new-tab \ 35 /bin/zsh -c 'export CLAUDE_CONTEXT_ID='"$ctx_id"'; exec zellij --session "'"$title"'" --layout cc-session' 36 37