-
-
Save pymmog/053708204b29427b3891bba100af5304 to your computer and use it in GitHub Desktop.
tmux session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| DIR="${1:-$(pwd)}" | |
| NAME="$(basename "$DIR")" | |
| tmux new-session -d -s "$NAME" -c "$DIR" -x "$(tput cols)" -y "$(tput lines)" | |
| # Rename first window | |
| tmux rename-window -t "$NAME:1" "coding" | |
| # Pane 1: LazyVim | |
| tmux send-keys -t "$NAME:1.1" "nvim" Enter | |
| # Pane 2: AI CLI (right top) | |
| tmux split-window -h -t "$NAME:1.1" -c "$DIR" -p 33 | |
| # use copilot, clode, codex, opencode or any other Coding LLM | |
| tmux send-keys -t "$NAME:1.2" "claude" Enter | |
| # Pane 3: Server (right bottom) | |
| tmux split-window -v -t "$NAME:1.2" -c "$DIR" -p 50 | |
| # Window 2: LazyGit | |
| tmux new-window -t "$NAME:2" -n "lazygit" -c "$DIR" | |
| tmux send-keys -t "$NAME:2" "lazygit" Enter | |
| # Focus back on window 1, pane 1 | |
| tmux select-window -t "$NAME:1" | |
| tmux select-pane -t 1 | |
| tmux attach -t "$NAME" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment