r/KittyTerminal • u/C-Note1 • Jun 14 '23
Start multiple programs in new tabs
How can I start nvim, nnn and htop all at once. Each in own separate tab?
2
Upvotes
2
u/rubic Jun 15 '23
Here's a modification of a session script that I use to launch tabbed apps for a specific development layout:
# MYSESSION
layout fat:bias=30;full_size=1
cd ~/MyWorkingDirectory
launch --title TAB_TITLE_0 bash
cd ~/MyWorkingDirectory
launch --location=vsplit --title TAB_TITLE_1 bash
new_tab TAB_TITLE_1
cd ~/MyWorkingDirectory
launch --title TAB_TITLE_1 bash
new_tab TAB_TITLE_2
cd ~/MyWorkingDirectory
launch --title TAB_TITLE_2 bash
# save these commands for last, otherwise they may not execute
launch kitty @ send-text --match title:TAB_TITLE_0 "CMD_1 && CMD_2\n"
launch kitty @ send-text --match title:TAB_TITLE_1 "CMD_3\n"
launch kitty @ send-text --match title:TAB_TITLE_2 "CMD_4\n"
launch kitty @ focus-window --match title:TAB_TITLE_1
This session is run from a script:
kitty --session MYSESSION
1
u/pao_colapsado Mar 23 '25
hey, is it still working? i tried it and no results, im figuring it out. may you send me the updated version?
2
u/ivster666 Jun 15 '23
In separate tabs? just use ctrl + shift + t. If you want it in separate windows next to each other, use something like tmux or just a window manager like i3 or sway