From ca78afe3d7c3b93c8e7056f1673ed4622f137ce0 Mon Sep 17 00:00:00 2001 From: Cameron Brown Date: Mon, 4 Nov 2024 22:26:57 -0500 Subject: [PATCH] NaviGator/scripts: Add script for launching tmux windows/pane (closes #1302) --- NaviGator/scripts/tmux_start.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/NaviGator/scripts/tmux_start.sh b/NaviGator/scripts/tmux_start.sh index b9e3ad402..86bbd27c4 100755 --- a/NaviGator/scripts/tmux_start.sh +++ b/NaviGator/scripts/tmux_start.sh @@ -2,18 +2,24 @@ if tmux has-session -t auto; then tmux a -t auto else + # First window (panes) tmux new-session -d -s auto tmux send-keys -t auto:0.0 'roslaunch navigator_launch master.launch --screen' Enter tmux split-window -h -t auto tmux split-window -v -t auto + + # Second window (alarms, other panes) + sleep 1.5 tmux new-window -t auto tmux split-window -h -t auto:1 tmux split-window -v -t auto:1 tmux split-window -v -t auto:1.0 - sleep 1.5 tmux send-keys 'amonitor kill' Enter tmux split-window -h tmux send-keys 'amonitor hw-kill' Enter tmux select-pane -t auto:1.0 + + # Return to the first window + tmux select-window -t auto:0 tmux a -t auto fi