rose-pine / tmux

Soho vibes for tmux
MIT License
156 stars 54 forks source link

TBD: Status-left/right priority + Recommended Nerd Font #10

Open IdoEsports opened 1 year ago

IdoEsports commented 1 year ago

Hey, what is the recommended nerd font here? I've tried and applied a few like FiraCode and CaskaydiaCove but wasn't able to replicate the icons that were shown in the screenshots.

Good work guys and would love a reply.

Screenshot 2023-07-16 at 2 08 40 AM
mrs4ndman commented 1 year ago

The font used in the screenshots is JetBrains Mono, from the nerdfonts.com website.

What icons are you trying to replicate?

IdoEsports commented 1 year ago

The font used in the screenshots is JetBrains Mono, from the nerdfonts.com website.

What icons are you trying to replicate?

I figured it out, I simply had to replace the separators with the icons I wanted.

But while I have you here, what is the best way to deal with clunky status bar when the window is shrunk.

So basically, is there a way to configure the responsiveness behavior of the status bar so that the window tabs are prioritized over everything else.

Fullscreen

Screenshot 2023-07-16 at 11 41 57 PM

smaller window split(notice how the windows don't show up but the rest of the information does. Is there a way to flip this behavior?)

Screenshot 2023-07-16 at 11 42 23 PM
mrs4ndman commented 1 year ago

I can make it so that, from a certain number of windows onwards, the elements on the rigth disappear / are hidden. I might take the time to implement it as a user feature. Thanks for the suggestion, just give me a bit of time

IdoEsports commented 1 year ago

I can make it so that, from a certain number of windows onwards, the elements on the rigth disappear / are hidden. I might take the time to implement it as a user feature. Thanks for the suggestion, just give me a bit of time

Yea that's perfect. i'm looking forward to it.

mrs4ndman commented 1 year ago

I have been doing some testing, and it is impossible to make it dynamic without the user needing to refresh the settings with Prefix + I (reloading the tmux.conf file)

I don't know if this will satisfy your needs:

set -g @rose_pine_prioritize_windows 'on'
# A setting to toggle the 2 following conditions
set -g @rose_pine_width_to_hide '80'
# If tmux's terminal size is less that '80' (or the number you choose), cut the status bar to only the directory.
set -g @rose_pine_window_count '5'
# If there are more than 5 (or the number you choose) windows open on the session, cut the status bar to only the directory

It is very complicated to make it dynamically update on the component space, as the tmux API and exposed functions don't provide a way to do so. Can look into letting you / the user choose what components appear in the "cut" / shorter state Edit: These features are not currently implemented, I am testing them right now

IdoEsports commented 1 year ago

the options you listed above could be pretty nice to have but let me give you a new perspective on this.

if we were to assume the right side elements are the preferred ones, right now we have ideal case. When the terminal size shrinks, the only thing that shows up are those elements.

I don't know what is happening with the window tabs when the terminal shrinks, whether they are being disabled or hidden. But if you were to reverse this behavior and allow window tabs to be shown instead, I believe that would be saner defaults.

I'm not sure if changing old code could be viable but that's my take on it.

mrs4ndman commented 1 year ago

I have searched through every StackOverflow and GitHub issue related with the tmux status-bar styling, and haven't found the setting to turn it around. I really want it, but I haven't found it after researching for hours. My best effort are the 2 options I showed you before + New settings to toggle the user + directory settings.

Do let me know if you find it, I am currently preparing the code and the readme.md for the new options

EDIT: Implemented in this commit

mrs4ndman commented 1 year ago

Is it OK if I edit the name of the issue to add the note about the status-left / right priority? I am going to pin it in the issues section

IdoEsports commented 1 year ago

yea sure, that works perfectly. Good work btw, looking forward to the feature implementation.

mrs4ndman commented 1 year ago

yea sure, that works perfectly. Good work btw, looking forward to the feature implementation.

For the priority one I will open when I have time a good PR / detailed issue to upstream.

My best effort are the 2 options I showed you before + New settings to toggle the user + directory settings. I am currently preparing the code and the readme.md for the new options

EDIT: Implemented in this commit

This one is already done, update the plugin and add the new configuration (instructions in the readme) to use it

IdoEsports commented 1 year ago

Wow you work fast, that's for sure. I just tried the new features out and a few things.

Problem #1: Atleast for me, my most common usecase of the status bar is to keep track of the windows. when prioritize_windows is 'on' i think the status bar should consist of nothing but the windows.

Suggestion: when prioritize_windows is enabled, remove everything except the windows from the status bar including the directory name, current window(this already feels a little redundant since the current window is already highlighted), and maybe even session name. All this information looks nice in fullscreen statusline so leave that be.

Problem #2(Not really a problem but a bug): This is regarding the new implemented 'window_status_separator'. For some reason, the separators between the 0 and 1 window is still the same blue arrow but the rest of the separators have changed to what i set. Look at the screenshot.

Screenshot 2023-07-19 at 12 27 20 AM
mrs4ndman commented 1 year ago

Wow you work fast, that's for sure. I just tried the new features out and a few things.

The codebase is small, and now in summer I have more free time to code :D On the first one: I can add a "hyper-focused" only windows setting

On the second one: I just tested changing to >, and I didn't get the bug that you mentioned. Have you reset tmux completely? Most of tmux's status-bar options require a reset to change them. Can test it more in-depth, but it might be a one-off. For now, I am adding a commit that makes the separator feature the one that switches between the user-set and the default one (instead of a hard-coded one).

Thanks for the feedback :)

IdoEsports commented 1 year ago

yea that hyper-focused only setting would be awesome.

On the second one: I just tested changing to >, and I didn't get the bug that you mentioned. Have you reset tmux completely? Most of tmux's status-bar options require a reset to change them.

Yea you're right, it works properly in a new session but just sourcing it seems to be the cause of the bug. Any suggestions to reset tmux without having to kill the session?

Thanks for the feedback :)

Thanks to you lol

mrs4ndman commented 1 year ago

Yea you're right, it works properly in a new session but just sourcing it seems to be the cause of the bug. Any suggestions to reset tmux without having to kill the session?

I will look into this tomorrow, but it is really weird. Will also try to get the hyper-focused feature for this week ;)

IdoEsports commented 1 year ago

that works. Thanks again.

mrs4ndman commented 1 year ago

Hyper-focus feature implemented on this commit: d588e25 The readme has the option syntax and explanation ;)

IdoEsports commented 1 year ago

very nice. It works perfectly as i imagined. The only thing now would be instead of making 'only-windows' a separate option i would prefer it to be the default behavior of 'prioritize_windows' option when either one of the conditions are met(too many windows or too little screen).

An alternative would be to make 'prioritize_windows' poly-valued instead of a simple on or off, include 'only-windows' as another value for prioritize_windows.

Also thank you again, good work.