Created
January 8, 2024 22:08
-
-
Save macintoshhelper/3a681739b6e3d95f20d2afe6174e1959 to your computer and use it in GitHub Desktop.
tmux split window script x6
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 | |
# Start a new tmux session | |
tmux new-session -d -s mysession | |
# Split panes and arrange them in a 2x3 grid | |
tmux split-window -h | |
tmux split-window -h | |
tmux select-layout even-horizontal | |
tmux split-window -v | |
tmux select-pane -t 0 | |
tmux split-window -v | |
tmux select-pane -t 2 | |
tmux split-window -v | |
# Attach to the session | |
tmux attach-session -t mysession |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tried to use ChatGPT to generate the script, and it ended up gaslighting me. Wasted 20 minutes going in circles of it hallucinating/giving me the wrong script. ChatGPT is like asking an army of a million five year olds, most of whom will give you the wrong answer and it can't figure out which one is fact or not.
StackOverflow came to the rescue.
https://unix.stackexchange.com/questions/32986/how-do-i-equally-balance-tmux1-split-panes
https://superuser.com/questions/1155771/tmux-split-into-4-panes
https://unix.stackexchange.com/questions/136631/how-to-switch-directly-to-a-pane-in-tmux