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

Ability to identify pane ids #10708

Open
Rosefield opened this issue Jul 19, 2021 · 3 comments
Open

Ability to identify pane ids #10708

Rosefield opened this issue Jul 19, 2021 · 3 comments
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.
Milestone

Comments

@Rosefield
Copy link
Contributor

Description of the new feature/enhancement

If features are going to be added that rely on the user providing a pane id, e.g. focus-pane $id or swap-panes -s $sid -t $tid it would be helpful to have a command (perhaps identify-pane) that identifies what the ids of each pane are. This would require making the currently internal _id public, or choosing some other method of identifying each pane.

This might look like (briefly?) showing the id centered in each pane (excuse the paint mockup)

image

Proposed technical implementation details (optional)

@Rosefield Rosefield added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Jul 19, 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 Jul 19, 2021
@zadjii-msft
Copy link
Member

you know, we've got this as a sub-point in #8592, but I guess it deserves it's own specific tracking task. Thanks!

@zadjii-msft zadjii-msft added Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels Jul 19, 2021
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jul 19, 2021
@zadjii-msft zadjii-msft added this to the Terminal Backlog milestone Jul 19, 2021
@DHowett DHowett removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Jul 22, 2021
@zadjii-msft zadjii-msft modified the milestones: Terminal Backlog, Backlog Jan 4, 2022
@noheromen
Copy link

noheromen commented Jan 9, 2023

Hi, any update here? It would be perfect to see list of all tabs and panes, and perhaps see which shell, what process is running in them?

I want to be able to jump to specific tab or pane, depending on the app (lets say I have nvim open in tab 3, pane 2). I could get ID of process, but I have no way to match it to that tab 3, pane 2... I would have to myself keep track what is where open....

Would it be possible to have command like:
"wt list tabs and panes"
output:

  1. pwsh process ID 10456/pwsh process ID 10452 (here are two panes)
  2. mingw process ID 10534
  3. wsl proces ID 102345
    eg...

@woodda
Copy link

woodda commented Apr 6, 2024

I would be immensely interested in this too. It would also be especially useful to expose the specific Window/Tab/Pane IDs for each of the Windows Terminal "viewports" within the env vars of its contained Bash shell, Command Window or Power Shell window for easy retrieval. This way, the values could be used to essentially track a specific "viewport" between re-launches of Windows Terminal, after it re-renders its layout.

I have a S.O. question opened about this, but I fear it is not currently possible to access the window/tab/pane IDs within a Linux shell environment running within Windows Terminal (specifically, within WSL2+Ubuntu). And the existing "WT_SESSION" and WSL_INTEROP bash shell environment variables are different each time a Bash shell is created when Windows Terminal restarts (i.e., those values don't persist after pre-rendering the layout).

The specific use case I have is to use Windows Terminal as my primary terminal multiplexer, but reconnect individually persisted Gnu Screen sessions to each re-opened bash shell in the Windows Terminal layout, no matter what the dynamic layout is. Then, with the window/tab/pane IDs exposed in the env vars of the shell, one could have their .bashrc file construct a unique name to assign to the individual Gnu Screen session associated with that specific Bash shell instance running on that particular WT viewport. The ID values (or indexes) would be the same after a Window Terminal restart and re-layout, and thus the same Gnu Screen session IDs could be reconstructed in .bashrc in order to reattached the original Screen session to the same viewport.

This doesn't seem to be a particularly difficult ask. Yet myriad benefits could arise from having these values exposed in the environment of the command process running in the viewport. One could write a command to display the unique viewport ID or number (or a "tuple" of window/tab/pane index values), have Bash scripts restart specific actions based on which viewport they start in, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

5 participants