rose-pine / tmux

Soho vibes for tmux
MIT License
135 stars 48 forks source link

On line #188, a ternary is opened but never closed (`#{?client_prefix`) #8

Closed cascassette closed 1 year ago

cascassette commented 1 year ago

I couldn't fix it, because it's unclear to me what is meant by it. I looked around some tmux configuration, and there's no mention of this client_prefix condition. So I am also not 100% sure where the closing brace } should go.

From my own editing and messing around, I've found that the format of the ternary is strictly:

#{?condition,content_if_true,content_if_false}

so any spaces, after the comma, before the comma etc are also interpreted and put in the tmux statusline. The second thing I've noticed, is that while in other tmux -styles and -formats you can do foreground and background color in one go: #[fg=color_one,bg=color_two], you can not do this in the ternary expression, so you have to fully do #[fg=color_one]#[bg=color_two] inside the content_if_true or content_if_false parts of the ternary.

mrs4ndman commented 1 year ago

I have found the documentation for the ternary. However, when I originally implemented the colorscheme, I did not notice the missing closing bracket.

Looking at the code for a while, I did notice that there was some part of the CWD status that wasn't showing (which was a problem I was facing when first writing the plugin). Adding the missing bracket enabled the "2nd" style the directory status has. On the future (idk when, currently busy with life) will implement it as a tmux option for everyone to choose.

I was already aware of how tmux picked up these various regions in the code and that the spaces and where they are placed affect the positioning in the bar.

Have been checking all the options and will push some very-needed changes and cleanup. It will target both this issue and #9, apart from fixing styling when some options aren't set.