Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add session concept to terminal like tmux #10331

Closed
soroshsabz opened this issue Jun 4, 2021 · 11 comments
Closed

Add session concept to terminal like tmux #10331

soroshsabz opened this issue Jun 4, 2021 · 11 comments
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@soroshsabz
Copy link

Description of the new feature/enhancement

I think Panes #1000 and tabs is very similar functionality to tmux , but I think very important feature in this area is missing that calls session. if we have session concept in terminal, we can have many opportunity like

  • share screen (it is very useful and cool)
  • panes settlement management
  • configuration management
  • tab settlement management
  • export and save whole situation and restore them when we need in tomorrow.
  • etc.
@soroshsabz soroshsabz added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Jun 4, 2021
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jun 4, 2021
@skyline75489
Copy link
Collaborator

#3656 is about integration with actual tmux (most likely running inside WSL or through SSH).

I think you're lokking for #960 & #961 .

@soroshsabz
Copy link
Author

@skyline75489 ok you right, I think if we gather together all of them (such as restore tab, restore panes, etc) in one unified concept such as session is very better approach and have many benefit more than development individually.

I think attachment and detachment feature in session concept is very powerful and useful

@skyline75489
Copy link
Collaborator

As a tmux user myself, I understand what you mean. Theoretically, there's two paths worth investigating:

  1. Implement tmux control mode (Add support for tmux Control Mode #3656) and bring tmux on Windows (Please add windows support for tmux tmux/tmux#2575).
  2. Implement the session mechanism (Restore previously closed session's state (Buffer contents) #961).

Practically, #3656 is possible, but requires a lot of work. And tmux/tmux#2575 is almost impossible, Believe me, I tried. Finally I myself consider #961 very hard, especially with the limited engineering power of the dev team (see the repo contributor list and you'll understand).

So yeah. I'd love the feature but I wouldn't get my hopes up right now.

@soroshsabz
Copy link
Author

@skyline75489 thanks for reply me :)

I think when Microsoft Windows Terminal approach to achieve panes and tabs natively, it is necessary to create (reinvent from tmux) session concept natively to support all of these features in productive way.

@skyline75489
Copy link
Collaborator

You’re welcome. In the meantime you can use wt.exe to do some sort of session-like operation. See https://docs.microsoft.com/en-us/windows/terminal/command-line-arguments?tabs=windows

@soroshsabz
Copy link
Author

@skyline75489 very thanks to response me, but I think this feature is very useful and important for Windows Terminal, so I think it is good to not close this issue, and I hope to Microsoft make invest on that :)

@zadjii-msft
Copy link
Member

For reference, I workaround this with a command in the command palette. I like to do like the following each time I boot up the Terminal in the morning:

{ "command": { "action": "wt", "commandline": "new-tab --title OpenConsole cmd.exe /k #work 15 ; split-pane -s .30 --title OpenConsole cmd.exe /k #work 15 ; split-pane  -s .25 -H cmd.exe /k media ; new-tab --title \"Symbols Script\" powershell dev\\symbols.ps1 ; new-tab -p \"Ubuntu 18.04\" ; new-tab -p \"microsoft/Terminal\" ; sp -V -p \"microsoft/Terminal\" ; sp -H -p \"microsoft/Terminal\" ; focus-tab -t 0" }, "name": "Good Morning" },

(you could probably make it shorter by replacing new-tab/split-pane with nt/sp, respectively).

I add that to the keybindings/actions. This creates a new command in the Command Palette named "Good Morning". That opens up a few tabs & panes, running various build environments. I like having it in a command rather than startupActions, because I only really want this in one terminal window, not every single one I launch. It's personal taste.

You could repeat this for multiple different "session"s if you wanted. That way you could have layouts pre-defined for various different dev environments.

There's also #5465 for "load commandlines from a file. That would be another way of having tmux-like sessions that you could compose in a file and load at runtime.

I think altogether, this ask sits somewhere between #961, #766, #1571, and #5465. So I'll just close this as a dupe of all those. Thanks!

/dup #961
/dup #766
/dup #1571
/dup #5465

@ghost
Copy link

ghost commented Jul 6, 2021

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Jul 6, 2021
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jul 6, 2021
@soroshsabz
Copy link
Author

soroshsabz commented Sep 2, 2021

@zadjii-msft @msftbot I think this issue is not duplicate, because one of the very useful and powerful feature like

  • share screen (it is very useful and cool)

does not see in #961 #766 #1571 #5465

I think this issue must be reopen @zadjii-msft

/no-dup #961
/no-dup #766
/no-dup #1571
/no-dup #5465

@zadjii-msft
Copy link
Member

Okay sorry, the other 4 bullet points though I think were covered in the threads I linked.

Could you elaborate on how you're using tmux sessions to share your screen?

@soroshsabz
Copy link
Author

we have many VMs ( for example lab or production ) that run many tmux sessions on each of them, (each session for one person) when I want to share my workspace (tmux panes and tabs and all data showing into that) with my colleague, I simple send vm name and tmux session name to my colleague, (he simple connect to VM and attach to my tmux session) and we can work together easily. and sharing same view of work and workspace.

I think tmux attach session feature is very popular features in Linux developer and DevOps ( I see this in many teams )

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

3 participants