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

Fresh install simply shows a solid, full-width line #308

Closed
adaviloper opened this issue May 7, 2023 · 5 comments · Fixed by #309
Closed

Fresh install simply shows a solid, full-width line #308

adaviloper opened this issue May 7, 2023 · 5 comments · Fixed by #309

Comments

@adaviloper
Copy link

image

After adding the plugin line to my tmux.conf file and using the prefix+I command from tpm to install tmux-powerline, the status bar updates to the above rather than the default from the README.md screenshots.
I'm not entirely sure what I'm missing and I've also gone through the ambiguous character check from #125 and I'm still getting the same result as in the image with the only thing showing being the window titles fully centered.

Terminal: iTerm2
Shell: zsh
Editor: NeoVim
OS: MacOS Monterey 12.6.4
Font: JetBrainsMono NerdFont

Directory Structure:

- ~/.config
    - tmux
        - plugins
            - tmux-powerline
            - tmux-sensible
            - tpm
        - tmux.conf
        - tmux.conf.local
    - tmux-powerline
        - themes
            - my-theme.sh
        - config.sh

I don't imagine the font is the issue as I've tried a Powerline font with the same result. I've also uninstalled everything and was able to start from the barebones Tmux status bar before installing tmux-powerline.

@erikw
Copy link
Owner

erikw commented May 7, 2023

Hello @adaviloper,

are you on a stable iTerm2 version or beta/nightly? I currently have an issue myself with iTerm2 beta versions and nerd fonts: https://gitlab.com/gnachman/iterm2/-/issues/10879

make sure Powerline glyphs works

Looking at that old issue you linked:

Verify that powerline symbols are rendered in the terminal:

$ grep SEPARATOR ~/.config/tmux/plugins/tmux-powerline/themes/default.sh | head -5

make sure tmux-powerline works

What happens when you run powerline directly in the terminal, any output?

For me it looks like

$ ~/.config/tmux/plugins/tmux-powerline/powerline.sh left
#[fg=colour234,bg=colour148] general:2.0 #[default]#[fg=colour148,bg=colour235]#[default]%

(powerline symbols not rendered on GitHub of course)

or try that with bash -x ... as described here: https://github.com/erikw/tmux-powerline#debugging

How is your tmux.conf looking: are there any other plugins enabled that could set tmux status-(left|right) settings? Try use a minimal tmux.conf with basically only TPM and this plugin.

@adaviloper
Copy link
Author

@erikw

I'm on a stable build using version 3.4.19.
$TERM is set to xterm-256color. Character encoding is set to Unicode (UTF-8)`

The output from that matches the values being assigned in the true condition of the if patched_font_in_use; then block.

I think we're honing into the issue here, though I'm not sure which step I've missed.

When trying to run the command directly, I get the following:

└─> ~/.config/tmux/plugins/tmux-powerline/powerline.sh left                                                                                                  14:20:23
/Users/<username>/.config/tmux/plugins/tmux-powerline/powerline.sh: line 3: realpath: command not found
/Users/<username>/.config/tmux/plugins/tmux-powerline/powerline.sh: line 5: ./lib/headers.sh: No such file or directory
/Users/<username>/.config/tmux/plugins/tmux-powerline/powerline.sh: line 7: powerline_muted: command not found
/Users/<username>/.config/tmux/plugins/tmux-powerline/powerline.sh: line 8: process_settings: command not found
/Users/<username>/.config/tmux/plugins/tmux-powerline/powerline.sh: line 9: check_arg_side: command not found
/Users/<username>/.config/tmux/plugins/tmux-powerline/powerline.sh: line 13: print_powerline: command not found

I did a fresh install to verify that all of the files are still there.

erikw added a commit that referenced this issue May 7, 2023
as it's not always available.

Fixes #308
@erikw
Copy link
Owner

erikw commented May 7, 2023

@adaviloper ah it seems to be that realpath is not available. I will try to simply stop using it.

Could you check out the branch fix/308 and see if it works then for you?

$ cd ~/.config/tmux/plugins/tmux-powerline/powerline.sh
$ git fetch
$ git switch fix/308
$ ./powerline.sh left 

@adaviloper
Copy link
Author

image

That seemed to immediately fix it. I'm only showing the center and right half to not show more sensitive information on the left)

@erikw erikw closed this as completed in #309 May 7, 2023
@erikw
Copy link
Owner

erikw commented May 7, 2023

Great! The fix is merged; you can switch back to the main branch.

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 a pull request may close this issue.

2 participants