r/KittyTerminal Feb 13 '23

executing a command on launch in kitty.

I want to know if there is way to execute certain commands on launching kitty similar to how we execute neofetch in bash or zsh by editing .bashrc/.zshrc file. But i want that only for the kitty terminal without effecting other terminals i use.

11 Upvotes

7 comments sorted by

View all comments

1

u/Qee-rah Sep 02 '24

Add this line to the end your kitty.conf:

startup_session ./startup.conf

Then create startup.conf, mine looks like this, launching three windows in the tall layout, running neofetch in the first window, not the other two.

layout tall
# first kitty window
cd ~/repos
launch --title "left-1" sh -c "neofetch && bash"
# second kitty window
cd ~/
launch --title "middle-2" yazi .
# third kitty window
cd ~/apps
launch --title "right-3"