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

Right status separator overlapping #245

Open
haggen opened this issue May 13, 2019 · 6 comments
Open

Right status separator overlapping #245

haggen opened this issue May 13, 2019 · 6 comments

Comments

@haggen
Copy link

haggen commented May 13, 2019

First of all I love this project! It got me going with tmux and I'm enjoying every minute of it.

Now, I noticed a strange issue when customizing the separators; separators in the right status bar get cut roughly in half.

Screenshot from 2019-05-13 18 11 58

I'm using the same character on both sides here to make it more obvious. See how on the left you can see the right point of the triangle, but on the right side it's like half-width?

I was skimming through the code but I'm new to tmux and terminal ricing in general so I did't have much luck, but I noticed what I believe is a typo:

# tmux_conf_theme_status_right=${tmux_conf_theme_status_right-'#{pairing}#{prefix} #{battery_status} #{battery_bar} #{battery_percentage} , %R , %d %b | #{username} | #{hostname} '}

The substitution ${...:-...} is missing a colon isn't it?

@gpakosz
Copy link
Owner

gpakosz commented May 13, 2019

Hello @haggen 👋

Can you please confirm which OS you're using, which terminal emulator and which tmux version?
Then, what symbols are you using? Can you please paste the related section from your ~/.tmux.conf.local copy?

tmux_conf_theme_left_separator_main=...
tmux_conf_theme_left_separator_sub=...
tmux_conf_theme_right_separator_main=...
tmux_conf_theme_right_separator_sub=...

Can you also please paste the value you're using for tmux_conf_theme_status_left and tmux_conf_theme_status_right?

Finally can you please paste the output of tmux show -g status-left and tmux show -g status-right?


About substitutions, I'm using ${parameter-default} because I want people to be able to remove either status-left or status-right by doing

tmux_conf_theme_status_left=

or

tmux_conf_theme_status_right=

@gpakosz
Copy link
Owner

gpakosz commented May 13, 2019

Nevermind,

You want

tmux_conf_theme_left_separator_main=''
tmux_conf_theme_left_separator_sub='|'
tmux_conf_theme_right_separator_main='#[reverse]#[noreverse]'
tmux_conf_theme_right_separator_sub='|'

The triangle symbol you're using needs to be reversed when displayed on the right side: this is what #[reverse] and #[noreverse] do.

Tell me if it's working for you

@haggen
Copy link
Author

haggen commented May 13, 2019

Hi @gpakosz 🖖

I'm using:

  • Elementary OS 5.0 Juno, i.e. Ubuntu 18.04 Bionic
  • Pantheon Terminal
  • tmux 2.6
  • Cousine Nerd Font

Here's the relevant parts from my .tmux.conf.local, but you can see it in full too:

tmux_conf_theme_left_separator_main=''
tmux_conf_theme_left_separator_sub=''
tmux_conf_theme_right_separator_main=''
tmux_conf_theme_right_separator_sub=''

...

tmux_conf_theme_status_left=' ❐ #S | ↑#{?uptime_d, #{uptime_d}d,}#{?uptime_h, #{uptime_h}h,}#{?uptime_m, #{uptime_m}m,} '
tmux_conf_theme_status_right='#{prefix}#{pairing}#{synchronized} #{?battery_status, #{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} , %b %d %R | #{username}#{root} | #{hostname} '

You'll notice it seem to differ from what configuration I used when took the first screenshot. It is. That was just me trying to debug the issue. Here's a new screenshot displaying the same issue with my actual configuration:

Screenshot from 2019-05-13 19 17 05

This time I used the actual character I'd like to use. It's a reversed version of the triangle I used on the left. They are discrete characters. Both come from Powerline Extra Symbols.

See how the right bar separators are being cut in half? You may think something's up with that character in particular, but if I use on the right the same character I used on the left--which displays fine--you can see it's being cut in half too, illustrating my point that the issue is probably not with the character itself.

Screenshot from 2019-05-13 19 16 23

Finally I'll try reversing the character on the left and seeing what comes of it.


Oh silly me, forgot about that substitution, thank you for pointing it out.

@haggen
Copy link
Author

haggen commented May 13, 2019

It worked! 👍

Reversing the character I use on the left status bar worked!

Screenshot from 2019-05-13 19 37 15

Though it's very counter intuitive, specially because these Powerline symbols always come in pair. It might be a good idea to mention it on the docs.

@gpakosz
Copy link
Owner

gpakosz commented May 14, 2019

Well it seems U+E0B8 and U+E0BE are not treated as the reverse of each other 🤷‍♂️

Here

$ tmux set -g status-right 'XXX'

is displayed as
image

While

$ tmux set -g status-right '#[reverse]#[noreverse]XXX'

is displayed as
image

It seems it has to do with Unicode character characters width, which is often a pain between tmux and the terminal emulator. I'm afraid there's pretty much nothing I can do from my configuration.

@haggen
Copy link
Author

haggen commented May 15, 2019

Well using reverse worked on my end (refer to my last screenshot) so for now it's just a quirk and not a prohibitive issue as far as I know. I guess it's cool for now.

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

No branches or pull requests

2 participants