home/.config/fish/functions/t.fish
2025-05-18 16:43:32 +02:00

21 lines
No EOL
415 B
Fish

function t
if not tmux has-session -t main 2>/dev/null
init_session
end
tmux attach-session -t main
end
function init_session
tmux new-session -d -s main -d -x (tput cols) -y (tput lines)
if command -q journalctl
tmux split-window -v -l 10 journalctl -f
else
tmux split-window -v -l 10 tail -f /var/log/messages
end
tmux select-pane -t 0
tmux split-window -h -l 50 btop
tmux select-pane -t 0
end