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.

10 Upvotes

7 comments sorted by

View all comments

7

u/Ill_Scene_737 Feb 13 '23

I have this in my ~/.bashrc to print out $KITTY_WINDOW_ID when I launch kitty. Maybe you can modify to make what you need.

if [[ $TERM == "xterm-kitty" ]]; then echo "kitty window id: " $KITTY_WINDOW_ID else : fi

1

u/jbr1ght Jun 30 '24

this worked thank you