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 a clickable button to status bar #3652
Comments
This is an interesting proposal, mostly because you can create custom user experiences that are more accessible. For example, in a mobile environment such as a phone or tablet, you could in theory create a completely tactile experience with an Application such as Termux. In the aforementioned application, I just touch to navigate between windows in Tmux. |
You could change |
@nicm I know I can't add buttons now, that's why I filed this issue. Please allow us to do it, probably using a plugin. |
@nicm couldn't this be considered a feature request, and something that can be added to https://github.com/tmux/tmux/wiki/Contributing ? There seems to be an instance at least (sixel) where you start with a hard no, and then you soften up to the idea. Is there another preferred channel to discuss suggestions like this one? I was thinking of having a simpel "+" next to the current Window "tab", to adda a new one ( useful when mouse support is on ). By the way, as a fun fact: I see #1613 which had some ongoing conversations and was locked, then unlocked by tmux just to be auto locked again. Shouldn't issues referenced in https://github.com/tmux/tmux/wiki/Contributing remain open for follow-up? Update: What an interesting read: csdvrx#1 |
It could be added to contributing but it isn't much of a feature request. What would it look like in practice? How would the buttons be configured? etc I did not say no to this in any way. |
@nicm thank you for clarifying, to get started here is a suggestion for the "New Window" button, that showing how it looks in unstyled and styled tmux. In terms of configurations, it could be a declaration inside "status-left", similar to how you can add
|
@MarioRicalde This is how I'd imagine this, thanks for the mock-up. @nicm Is it at least possible to get the character under the mouse cursor in the |
@nicm is there anything else I can do to help in terms of visuals? |
Clicking + to add a new window could be achieved if PR #3641 tries to allow |
I could imagine how it would look already :-). I need to think about how it would work... I think we should extend the |
The problem with SIXEL (and to a lesser extent images in general) is that it doesn't always work that well, there aren't that many terminals that support it, and it is a significant amount of work that I don't personally care about very much, so it needs someone who does to move it forward and generate a bit of enthusiasm. So far nobody has taken that on and stuck with it. If you want to get involved, @topcat001 has been working on it recently and the branch works for simple use cases - see https://github.com/orgs/tmux/discussions/3565. I think if we got a slighly nicer placeholder (even just a box with |
Please try this: tmux-new-ranges.diff.txt This adds three new range types: It also adds two new format variables: Here is an example which adds two new status lines, one with a couple of user ranges and one with the sessions:
And an example which adds an
Adding a There are a few bits of further work:
@faustind please review and test also since this will work instead of your |
I'll merge a small update with a filled in placeholder soon to the |
Thank you @nicm Screen.Recording.2023-08-17.at.22.52.25.mov |
Great, this has been working for me also, so I have applied it now. It will be in GitHub later on when it syncs. Let me know if you see any problems. Thanks! |
Thanks @nicm! I've appended
UPDATE: I'm using it in my project Carbonyl Terminal: |
I tried cat'ing a sixel image with master tmux branch that enabled sixel support (configured with |
@amanvm only Are you sure you restarted the server? :) |
@topcat001 Yes I did restart the server, it doesn't work. I have a aarch64 macOS, but tested it on ArchLinux VM too. What I see is that cat doesn't work. lsix does produce a tiny few cursor wide result, but never bigger than that. cat works outside in iTerm2 and other terminals. Here's a screenshot, and test files (monkey.zip). I have created an issue: #3668 (comment). cat works outside tmux in iTerm2, as can be seen in the image below: |
@amanvm This issue is about clickable buttons, not sixel support. |
Perfection. @nicm thank you so much it's amazing, huge for certain clicker users. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
How to add a
+
button to the status bar, which will create a new window on mouse click (provided that the mouse mode is on)? And how to add anX
button to each window in the windows list, which will close the window on mouse click?Thanks!
The text was updated successfully, but these errors were encountered: