janoamaral / tokyo-night-tmux

A clean, dark Tmux theme that celebrates the lights of Downtown Tokyo at night.
https://github.com/janoamaral/tokyo-night-tmux/wiki
Other
251 stars 67 forks source link

WSL2 + Alacritty rendering issue #47

Closed Simple-MAX closed 2 months ago

Simple-MAX commented 3 months ago

Describe the issue To clarify everything works fine with Windows terminal with WSL2. I recently decided to go back to my old setup, which I was Alacritty with WSL2, and saw some issues with how Tmux is rendering the status bar.

To Reproduce Steps to reproduce the issue:

  1. Go to Alacritty
  2. set this as your config
    
    set -sg escape-time 50
    set -g default-terminal "tmux-256color"
    set-option -sa terminal-overrides ",xterm*:Tc"
    set -g mouse on

unbind C-b set -g prefix C-Space bind C-Space send-prefix bind '"' split-window -v -c "#{pane_current_path}" bind % split-window -h -c "#{pane_current_path}"

set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'christoomey/vim-tmux-navigator' set -g @plugin "janoamaral/tokyo-night-tmux"

set -g @plugin 'fabioluciano/tmux-tokyo-night'

set -g @tokyo-night-tmux_window_id_style digital set -g @tokyo-night-tmux_pane_id_style hsquare set -g @tokyo-night-tmux_zoom_id_style dsquare

run '~/.tmux/plugins/tpm/tpm


3. Start Tmux
4. See error

**Screenshots**
## Windows terminal with WSL2
![image](https://github.com/janoamaral/tokyo-night-tmux/assets/19856805/51036ef7-dd93-4c2a-aade-bd35153b37a2)
## Alacritty with WSL2
![image](https://github.com/janoamaral/tokyo-night-tmux/assets/19856805/41269acd-d319-46c1-8038-185a51329c00)

**Environment (please complete the following information):**
- OS: Windows 11
- WSL OS: Ubuntu 22.04.3
- terminal Alacritty
- tmux version 3.2a
- tokyo-night-tmux branch master

## One solution that works for me 
switch to 'fabioluciano/tmux-tokyo-night'
tribhuwan-kumar commented 3 months ago

Checked in alacritty 0.13.1 everything is fine! Maybe you should update your Alacritty terminal

hambergerpls commented 3 months ago

I'm also currently facing this issue.

This is an issue with Alacritty on Windows when it can't render a glyph due to missing symbols. You can verify this when using Windows Terminal where it renders correctly but some glyphs are still missing.

One of the fix is to add font fallback. https://github.com/ryanoasis/nerd-fonts/wiki/Font-Substitution-&-Fallback

This fixes some of the glyphs, but strangely there are still missing glyphs even though I have installed the required fonts.

Screenshot 2024-04-02 214434

janoamaral commented 3 months ago

This fixes some of the glyphs, but strangely there are still missing glyphs even though I have installed the required fonts.

The window number didn't surprise me, because it caused problems in macOS too. What I found curious is the gray spaces before session name, window name and branch name... I suspect that maybe the reset is causing it.

hambergerpls commented 3 months ago

The window number didn't surprise me, because it caused problems in macOS too. What I found curious is the gray spaces before session name, window name and branch name... I suspect that maybe the reset is causing it.

Yeah the window number uses Legacy Computing Symbols as you mentioned, which is absent in Windows. Based on this discussion, only Iosevka has them, so setting this font as a fallback on Windows should fix the missing legacy computing symbols. But oddly, it didn't.

I had to set the IosevkaTerm font in Windows Terminal to the render legacy computing symbols.

Screenshot 2024-04-03 155526

As for Alacritty, when I set the font to IosevkaTerm, it renders the glyphs properly, however I'm still getting wrapped status bar and the gray spaces you mentioned.

image

I played around the status icons and found that it is caused by some glyphs. For the right status bar, I only enabled date and time. image

hambergerpls commented 3 months ago

So I guess this problem is specific to Alacritty on Windows due to fonts/glyphs.