Warp icon indicating copy to clipboard operation
Warp copied to clipboard

Configure default directory for new tab, new windows, new session, new pane

Open mittalyashu opened this issue 3 years ago • 11 comments

Is your feature request related to a problem? Please describe.

When opening a new tab using command + T it opens the terminal in same as previous tab directory path.

Instead it should open in the default directory, defined by user in preferences, same goes when opening a new Warp window.

mittalyashu avatar Aug 07 '21 06:08 mittalyashu

Good call. We are planning on implementing this behind a user setting.

zachlloyd avatar Aug 16 '21 14:08 zachlloyd

@zachlloyd glad to hear it'll be configurable. The way it is currently is my preferred/expected behaviour (new window -> default dir, new tab -> current dir)

bkbooth avatar Oct 25 '21 23:10 bkbooth

My preferred/expected behavior is different from the above posters (new window -> current dir) and (new tab -> current dir).

Configurable sounds great as it sounds like different folks have different expectations / preferences for this.

If you want to consolidate - you probably merge #322 into this and rename this to handle both tabs and new windows

nipunn1313 avatar Nov 08 '21 19:11 nipunn1313

From @nipunn1313 via #322

Describe the solution you'd like?

When opening a new window or tab while focus is on an existing window, I would love for the default current working directory (cwd) to match the one on the preexisting window.

Alacritty has this behavior and I find it useful
Terminal/ITerm appear to have it in settings, but it's not default

Is your feature request related to a problem? Please describe.

When I'm working on a project in a particular directory, 80% of the time when I open a new tab, I want to be in the same directory (eg open a build in another window).

The other 20% of the time, I'm happy to do a `cd` at the beginning (probably was planning to anyway).

Additional context

No response

elviskahoro avatar Jan 22 '22 21:01 elviskahoro

From @DreierF via #656

Describe the solution you'd like?

I'd like to have a setting to override the default working dir, which is ~ ATM.

Is your feature request related to a problem? Please describe.

I mainly work on one project and it is annoying to have to cd into this directory at the start of every session. I don't want to add this to `.zshrc` as I also use the finder integration of `iTerm` for example to open the terminal in the current folder, which does no longer work when adding `cd project` in `.zshrc`

Additional context

iTerm settings: image

elviskahoro avatar Jan 22 '22 21:01 elviskahoro

I've added cd ~ to the end of my .zsrhc as a temporary solution.

syabro avatar Feb 28 '22 03:02 syabro

This is something I'm needing as well. Currently, I use ITerm2 and it has the ability to save different layouts (ie. tabs and splits and what directories each are on). And then you can save which layout will be used by default when opening a new window.

My current default has 3 tabs, tab 1 split 4 ways, and tab 2/3 split two ways. Each are to different repos and it's really nice in the morning to just open my terminal and have everything ready to work.

davidlukerice avatar Apr 29 '22 14:04 davidlukerice

From alejoar via Discord Being able to configure the path opened by new split panes

elviskahoro avatar May 09 '22 17:05 elviskahoro

When can we expect this feature to be ready? It really makes me waste time whenever I create a new pane and it situates me in the same path as the old pane.

Looking forward to it!

alejoar avatar May 09 '22 18:05 alejoar

@alejoar I'm not sure. Going to bring it back up to the team though.

elviskahoro avatar Jul 05 '22 04:07 elviskahoro

Just showing my support here. It's really one of the main things I am missing from iTerm 2. I want a new session to start in ~/Sites but when I open a new tab, I want it to start in whatever PWD I am in. In the meantime, I've added this to my .zshrc...

# Starting Directory
cd $HOME/Sites/

But then when I open new tabs, they all start in ~/Sites.

If I remove this line from .zshrc, new windows start in ~, but new tabs open in PWD. I want my cake and eat it too! 😁

jacobgraf avatar Jul 27 '22 16:07 jacobgraf

It's still not possible to to configure what the default directory is via the settings. But it is possible to save an arrangement via Launch Configurations CTRL-CMD-L.

See docs: https://docs.warp.dev/features/session-management/launch-configurations

elviskahoro avatar Aug 22 '22 14:08 elviskahoro

It's still not possible to to configure what the default directory is via the settings. But it is possible to save an arrangement via Launch Configurations CTRL-CMD-L.

See docs: https://docs.warp.dev/features/session-management/launch-configurations

Hmm.

Seems to be inconsistencies between the docs and the app itself. In the docs, the launch configs are at ~/.warp/launch_configurations/ but when you do the CMD-CTRL-L shortcut, it says they are at ~/.warp/session_templates/.

Screenshot: https://cln.sh/OwFLLdCt9aPbjxTQFwgn

Also, how do you set the default launch config??

jacobgraf avatar Aug 22 '22 14:08 jacobgraf

It isn't possible to set a default launch configuration. Maybe we can add that to this feature request.

--- original message --- On August 22, 2022, 10:36 AM EDT @.*** wrote:

It's still not possible to to configure what the default directory is via the settings. But it is possible to save an arrangement via Launch Configurations CTRL-CMD-L.

See docs: https://docs.warp.dev/features/session-management/launch-configurations

Hmm.

Seems to be inconsistencies between the docs and the app itself. In the docs, the launch configs are at ~/.warp/launch_configurations/ but when you do the CMD-CTRL-L shortcut, it says they are at ~/.warp/session_templates/.

Screenshot: https://cln.sh/OwFLLdCt9aPbjxTQFwgn

Also, how do you set the default launch config??

Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- You received this message because you are subscribed to the Google Groups "github" group. To unsubscribe from this group and stop receiving emails from it, send an email to @.*** --- end of original message ---

warpdotdev-devx avatar Aug 22 '22 15:08 warpdotdev-devx

It isn't possible to set a default launch configuration. Maybe we can add that to this feature request. --- original message --- On August 22, 2022, 10:36 AM EDT @.*** wrote: It's still not possible to to configure what the default directory is via the settings. But it is possible to save an arrangement via Launch Configurations CTRL-CMD-L. See docs: https://docs.warp.dev/features/session-management/launch-configurations Hmm. Seems to be inconsistencies between the docs and the app itself. In the docs, the launch configs are at ~/.warp/launch_configurations/ but when you do the CMD-CTRL-L shortcut, it says they are at ~/.warp/session_templates/. Screenshot: https://cln.sh/OwFLLdCt9aPbjxTQFwgn Also, how do you set the default launch config?? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.> -- You received this message because you are subscribed to the Google Groups "github" group. To unsubscribe from this group and stop receiving emails from it, send an email to @. --- end of original message ---

Ergh. Being able to have Warp start in a specific directory is literally the one thing I've been missing since I switched from iTerm 2. I've been patiently waiting for this since I chatted with your team back last November.

We're so close! I'll keep an eye on future updates and hopefully there is a solution!

Thanks!

jacobgraf avatar Aug 22 '22 15:08 jacobgraf

@jacobgraf

We've recently released Launch Configurations and that may help with the initial launch of the terminal to specific directories. Will post any more updates on user defined default directories here.

dannyneira avatar Sep 02 '22 21:09 dannyneira

@jacobgraf

We've recently released Launch Configurations and that may help with the initial launch of the terminal to specific directories. Will post any more updates on user defined default directories here.

Yeah, but like I said, there still isn't a way to specify a default launch configuration, correct? That's the issue here. I can create a config, but if I have to manually open a specific config every time I launch, I might as well manually change directories too. Hoping I'm missing something?

jacobgraf avatar Sep 02 '22 21:09 jacobgraf

I have read the Launch Configurations and still have no idea how to config this behavior: open default directory for new tab. Can someone help with the config?

dqhieu avatar Dec 15 '22 04:12 dqhieu

I've added cd ~ to the end of my .zsrhc as a temporary solution.

Thanks. I'm doing this too

dqhieu avatar Dec 15 '22 04:12 dqhieu

When I open a new tab or a new window, I expect a new terminal. I do not want my first command on opening a new tab to be cd. Just put me in my home directory when I open a new tab.

This is a breaking change from every other terminal emulator I've ever used. New tabs should be new, they shouldn't carry context (ie working directory) from another tab.

This is the number one annoyance I have with Warp.

mhsemcheski avatar Jan 30 '23 22:01 mhsemcheski

@mhsemcheski

There is a workaround to use cd ~ in your .bashrc or .zshrc file to set the default directory on each new Window/Tab/Pane, but yes, potentially this could be a setting as well in the future.

Early Sneak preview of this feature in action ( *not final ) ⬇️

CleanShot 2023-02-08 at 11 29 15

dannyneira avatar Feb 03 '23 16:02 dannyneira

Hey all! I've sent out a PR internally to add this functionality; it probably won't make next week's release but I'm optimistic that'll it'll go live in the 2/16 release. :)

vorporeal avatar Feb 03 '23 18:02 vorporeal

This is now live! You can find the options in Settings > Features > Session > "Working directory for new sessions". You can choose to have all new sessions start in your home directory, a custom directory, or inherit the previous session's working directory, or you can select "Advanced" and configure it separately for new tabs, new windows, and new split panes!

While I'm going to close this as completed, please don't hesitate to leave a comment with any feedback you have!

vorporeal avatar Feb 27 '23 17:02 vorporeal