#!/bin/sh conn=$1; shift if tmux ls | grep ^${conn}:; then tmux attach -t ${conn} exit 0 fi case "$conn" in edurable) tmux new-session -s ${conn} -d ping 192.168.3.102 tmux split-window -t ${conn} -h ping 192.168.3.103 tmux select-layout -t ${conn} even-horizontal tmux split-window -t ${conn} -v ping 192.168.3.104 tmux select-pane -t ${conn} -L tmux split-window -t ${conn} -v ping 192.168.3.105 tmux attach -t ${conn} ;; rmgreen) tmux new-session -s ${conn} -d ping 195.48.74.164 tmux split-window -t ${conn} -h ping 195.48.74.132 tmux split-window -t ${conn} -h ping 195.48.74.134 tmux select-layout -t ${conn} even-horizontal tmux split-window -t ${conn} -v ping 195.48.74.135 tmux select-pane -t ${conn} -L tmux split-window -t ${conn} -v ping 195.48.74.133 tmux select-pane -t ${conn} -L tmux split-window -t ${conn} -v ping 195.48.74.165 tmux attach -t ${conn} ;; rmrouterv6) tmux new-session -s ${conn} -d ping 2a0f:98c0:1::2 tmux split-window -t ${conn} -h ping 2a0f:98c0:2::2 tmux split-window -t ${conn} -h ping 2a0f:98c0:9::2 tmux select-layout -t ${conn} even-horizontal tmux split-window -t ${conn} -v ping 2a0f:98c0:9::3 tmux select-pane -t ${conn} -L tmux split-window -t ${conn} -v ping 2a0f:98c0:2::3 tmux select-pane -t ${conn} -L tmux split-window -t ${conn} -v ping 2a0f:98c0:1::3 tmux attach -t ${conn} ;; rmrouterv4) tmux new-session -s ${conn} -d ping 172.16.6.2 tmux split-window -t ${conn} -h ping 172.16.16.2 tmux split-window -t ${conn} -h ping 172.16.32.2 tmux select-layout -t ${conn} even-horizontal tmux split-window -t ${conn} -v ping 172.16.32.3 tmux select-pane -t ${conn} -L tmux split-window -t ${conn} -v ping 172.16.16.3 tmux select-pane -t ${conn} -L tmux split-window -t ${conn} -v ping 172.16.6.3 tmux attach -t ${conn} ;; rmapu) tmux new-session -s ${conn} -d ping 2a0f:98c0:1::15 tmux split-window -t ${conn} -h ping 2a0f:98c0:2::15 tmux split-window -t ${conn} -h ping 2a0f:98c0:9::15 tmux select-layout -t ${conn} even-horizontal tmux split-window -t ${conn} -v ping 2a0f:98c0:9::16 tmux select-pane -t ${conn} -L tmux split-window -t ${conn} -v ping 2a0f:98c0:2::16 tmux select-pane -t ${conn} -L tmux split-window -t ${conn} -v ping 2a0f:98c0:1::16 tmux attach -t ${conn} ;; rmapugreen) tmux new-session -s ${conn} -d ping 195.48.74.167 tmux split-window -t ${conn} -h ping 195.48.74.137 tmux split-window -t ${conn} -h ping 195.48.74.139 tmux select-layout -t ${conn} even-horizontal tmux split-window -t ${conn} -v ping 195.48.74.140 tmux select-pane -t ${conn} -L tmux split-window -t ${conn} -v ping 195.48.74.138 tmux select-pane -t ${conn} -L tmux split-window -t ${conn} -v ping 195.48.74.168 tmux attach -t ${conn} ;; rmv6) tmux new-session -s rmv6 -d ping 2a0f:98c0:7::1 tmux split-window -t rmv6 -h ping 2a0f:98c0:3::1 tmux split-window -t rmv6 -h ping 2a01:2a8:a182::8 tmux select-layout -t rmv6 even-horizontal tmux split-window -t rmv6 -v ping 2a01:2a8:a182::9 tmux select-pane -t rmv6 -L tmux split-window -t rmv6 -v ping 2a0f:98c0:4::1 tmux select-pane -t rmv6 -L tmux split-window -t rmv6 -v ping 2a0f:98c0:8::1 tmux attach -t rmv6 ;; rmv4) tmux new-session -s "$conn" -d ping 147.78.193.9 tmux split-window -t "$conn" -h ping 147.78.192.9 tmux split-window -t "$conn" -h ping 195.48.74.134 tmux select-layout -t "$conn" even-horizontal tmux split-window -t "$conn" -v ping 195.48.74.135 tmux select-pane -t "$conn" -L tmux split-window -t "$conn" -v ping 147.78.192.10 tmux select-pane -t "$conn" -L tmux split-window -t "$conn" -v ping 147.78.193.10 tmux attach -t "$conn" ;; ungleich) tmux new-session -s "$conn" -d ping nico-vm.schottelius.org tmux split-window -t "$conn" -h ping 147.78.192.9 ;; v6test) tmux new-session -s v6test -d ping 2600:: tmux split-window -t v6test -h ping -6 heise.de tmux split-window -t v6test -h ping emonitor1.place12.ungleich.ch tmux select-layout -t v6test even-horizontal tmux split-window -t v6test -v ping router1.place10.ungleich.ch tmux select-pane -t v6test -L tmux split-window -t v6test -v ping router1.place7.ungleich.ch tmux select-pane -t v6test -L tmux split-window -t v6test -v ping vm1.place11.ungleich.ch tmux attach -t v6test ;; 148) tmux new-session -s "$conn" -d ping 148.222.251.1 tmux split-window -t "$conn" -h ping 148.222.250.1 tmux split-window -t "$conn" -h ping 148.222.249.1 tmux select-layout -t "$conn" even-horizontal tmux split-window -t "$conn" -v ping 148.222.248.1 tmux select-pane -t "$conn" -L tmux split-window -t "$conn" -v ping 148.222.248.2 #tmux select-pane -t "$conn" -L #tmux split-window -t "$conn" -v ping 91.194.139.5 tmux attach -t "$conn" ;; 91) tmux new-session -s "$conn" -d ping 91.194.139.0 tmux split-window -t "$conn" -h ping 91.194.139.1 tmux split-window -t "$conn" -h ping 91.194.139.2 tmux select-layout -t "$conn" even-horizontal tmux split-window -t "$conn" -v ping 91.194.139.3 tmux select-pane -t "$conn" -L tmux split-window -t "$conn" -v ping 91.194.139.4 tmux select-pane -t "$conn" -L tmux split-window -t "$conn" -v ping 91.194.139.5 tmux attach -t "$conn" ;; p5-p10-p15) tmux new-session -s "$conn" -d ping 2a0a:e5c0:33::1 tmux split-window -t "$conn" -h ping 2a0a:e5c0:42::1 tmux split-window -t "$conn" -h ping 2a0a:e5c0:2d::1 tmux select-layout -t "$conn" even-horizontal tmux split-window -t "$conn" -v ping 2a0a:e5c0:2e::1 tmux select-pane -t "$conn" -L tmux split-window -t "$conn" -v ping 2a0a:e5c0:43::1 tmux select-pane -t "$conn" -L tmux split-window -t "$conn" -v ping 2a0a:e5c0:34::1 tmux attach -t "$conn" ;; genauso) tmux new-session -s "$conn" -d ping router2.ge.nau.so tmux split-window -t "$conn" -h ping router3.ge.nau.so tmux split-window -t "$conn" -h ping loch.un.ge.nau.so tmux select-layout -t "$conn" even-horizontal # tmux split-window -t "$conn" -v ping 2a0a:e5c0:2e::1 # tmux select-pane -t "$conn" -L # tmux split-window -t "$conn" -v ping 2a0a:e5c0:43::1 # tmux select-pane -t "$conn" -L # tmux split-window -t "$conn" -v ping 2a0a:e5c0:34::1 tmux attach -t "$conn" ;; esac