I am new to using tmux in scripting and I am attempting to manipulate it so when I run a script I can have multiple screens attached and split in my Putty
session, and also have it color coded and binded so that if I use ALT+arrow key
it will switch to the next pane. This is what I have so far for coding:
tmux new-session -d -s PortalDB
tmux selectp -t PortalDB
tmux splitw -h -p 50
tmux attach -t PortalDB
tmux set-window-option -g window-status-current-bg yellow
tmux new-session -d -s HardwareAgent
tmux selectp -t HardwareAgent
tmux splitw -h -p 50
tmux attach -t HardwareAgent
tmux set-window-option -g window-status-current-bg blue
tmux new-session -d -s Profile
tmux selectp -t Profile
tmux splitw -h -p 50
tmux attach -t Profile
tmux set-window-option -g window-status-current-bg red
tmux new-session -d -s JoinCode
tmux selectp -t JoinCode
tmux splitw -h -p 50
tmux attach -t JoinCode
tmux set-window-option -g window-status-current-bg green
tmux bind -n M-Left select-pane -L
tmux bind -n M-Right select-pane -R
tmux bind -n M-Up select-pane -U
tmux bind -n M-Down select-pane -D
When I run the script, the color coding works, however I want it to split the screens horizontally, but instead I get this:
Can someone suggest a way where I can split the panes evenly? Another thing I noticed is that when I run this script, it runs 4 different windows attached to the sessions I named, I just need it to split horizontally 4 times in one window. Can anyone suggest how to make it as such?