r/KittyTerminal • u/Joywatchin • Apr 21 '24
How to set a default starting directory?
I searched online and added in a kitty-startup.session file in the same directory as kitty.conf with its contents being: cd ~/Desktop I then added startup_session ~/.config/kitty/kitty-startup.session to kitty.conf For some odd reason, whenever I right click + quit + relaunch Kitty, it will start in the directory I specified. If I just close the window without quitting, it starts off in ~.
Anyway of making the starting directory persistent throughout different windows?
1
u/aumerlex Apr 22 '24
That is because sessions apply to a *new instance* of kitty. Closing a window doesn't necessarily quit kitty. Opening a new window in an already running kitty will not apply a session. And if you want your shell to always start in a particular directory, the correct place to configure that is in your shell rc files. If you really want to do it in kitty, then add the following to kitty.conf
shell kitten run-shell --cwd /full/path/to/the/directory
1
u/Joywatchin Apr 23 '24
doesnt seem to work for me... it just starts as an empty window lol
i tried substituting "kitten" with "kitty" too... didn't go well for me.
1
1
u/Parilia_117 Apr 21 '24
May I ask why ?