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

Multiplexer session names #726

Open
nojhan opened this issue Aug 16, 2022 · 2 comments
Open

Multiplexer session names #726

nojhan opened this issue Aug 16, 2022 · 2 comments
Labels
enhancement Feature request needs information More information needed from the reporter

Comments

@nojhan
Copy link
Collaborator

nojhan commented Aug 16, 2022

Display terminal multiplexer (screen/tmux) session names.

Description

Display the list of sessions having a name (i.e. not just a number).
This may be displayed near the jobs section (within parentheses right after the d counter?) and only for detached ones (the currently attached session surely displays its name in some status bar).

Should probably be disabled by default.

How will this be useful?

Important sessions (long jobs, services, etc.) tend to be named, hence being able to spot them rapidly is important.

@nojhan nojhan added the enhancement Feature request label Aug 16, 2022
@Rycieos
Copy link
Collaborator

Rycieos commented Aug 21, 2022

Good idea, I would find this useful.

I do not know how to gather this information though. The only way we have currently to count detached sessions is to ask the tool to print them all, and we count the lines. Both tmux and screen will show the custom names there, but show no way to actually detect if the name is a custom one or not. We would have to do some hacky regex to figure it out, and that leads to edge cases since we would be guessing.

Open to ideas.

@Rycieos Rycieos added the needs information More information needed from the reporter label Aug 21, 2022
@nojhan
Copy link
Collaborator Author

nojhan commented Oct 28, 2022

tmux' default names are just numbers (same as the unique ID), so it should be fairly easy to just not count those sessions, even if the user did set up a number as a custom name.

screen is a bit tricky, as it displays <PID>.pts-<ID>.<host> for defaults, and <PID>.<name> for named sessions. But I think it would also be fair enough to just discard sessions with "pts-" in their ID.

As for the display, I think we should use superscript numbers: ⁰¹²³⁴⁵⁶⁷⁸⁹. This would give something like: « 2d³ » or « 2³d ».

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request needs information More information needed from the reporter
Projects
None yet
Development

No branches or pull requests

2 participants