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

Improve the handling of separation between window title and status #264

Closed
wants to merge 2 commits into from

Conversation

j-xella
Copy link
Contributor

@j-xella j-xella commented Aug 3, 2024

  1. Before, it was always separated by space, now the separator can be changed or removed via global option
  2. Now, the separator is only added if there is an actual status to display. Works for custom separator icons only.

Aleksandr Jakusev added 2 commits August 4, 2024 01:26
Backward-compatible change, allows adding separators before or after the
option value if the option is not empty.
The default space separator in front of the status icons can now be
removed, or changed to something else.

Also, the separator logic is now enhanced; the separator is only added
if the status icon is not empty. Unfortunately, it does not work with
status as text, because the value is not available yet when the
separator is added.
@vdbe
Copy link
Contributor

vdbe commented Aug 4, 2024

This is a decision made by the theme, see #168

@vdbe vdbe closed this Aug 4, 2024
@j-xella
Copy link
Contributor Author

j-xella commented Aug 4, 2024

OK, understood, the theme wants window status indicators always separated by spaces.

But this PR also has another part to it, a bug fix IMHO. Similar to what #265 does to status modules.

Let's say user sets active window icon to null. Then the icon is not shown, but the separator space is added nevertheless to the window info. IMO, there should be no separator if status icon is removed, correct?

Would this PR be considered if only that part is left?

@vdbe
Copy link
Contributor

vdbe commented Aug 4, 2024

if you can find a could way to remove the space if it's empty yes, without changing get_tmux_option.

Best way I could come up with is using this echo "[${icon:+ $icon}]"
image

@j-xella
Copy link
Contributor Author

j-xella commented Aug 4, 2024

Please see #270

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants