#!/bin/sh

SESSION="FOO"

tmux start-server

if ! tmux has-session -t ${SESSION} 2>/dev/null; then
	tmux -2 new-session -d -x "$(tput cols)" -y "$(tput lines)" -s ${SESSION}

	tmux selectp -t 0
	tmux splitw -v -l 15 # pane 1 is at the bottom

	tmux selectp -t 1
	tmux send-keys "htop" C-m

	tmux selectp -t 0
	tmux splitw -h
fi

tmux -2 attach-session -t ${SESSION}
