joshmedeski / sesh

Smart session manager for the terminal
MIT License
410 stars 16 forks source link

Nerd fonts dont render when i use sesh to create a new tmux session #103

Open SuyashPatil-29 opened 1 month ago

SuyashPatil-29 commented 1 month ago

What happened?

When I open a new session using sesh my nerdfonts dont render nor on my terminal nor in my neovim

Expected -

image

Whats happening -

image

On neovim - Expected -

image

Whats happening -

image

Version

sesh version dev

Relevant log output

No response

Reviewed

SuyashPatil-29 commented 1 month ago

I am on ubuntu 22.04 and have the nerd fonts installed and working.

joshmedeski commented 1 month ago

Interesting, how are you calling sesh? Just directly in the terminal "sesh connect 'ai-roadmap-generator'"?

Also, if you run this outside of tmux, do you see icons?

sesh list -i
Hugo-Persson commented 1 month ago

I have the same issue on mac

If I run:

sesh list -i | fzf-tmux -p 55%,60% \
        --no-sort --border-label ' sesh ' --prompt '⚑  ' \
        --header '  ^a all ^t tmux ^g configs ^x zoxide ^d tmux kill ^f find' \
        --bind 'tab:down,btab:up' \
        --bind 'ctrl-a:change-prompt(⚑  )+reload(sesh list)' \
        --bind 'ctrl-t:change-prompt(πŸͺŸ  )+reload(sesh list -t)' \
        --bind 'ctrl-g:change-prompt(βš™οΈ  )+reload(sesh list -c)' \
        --bind 'ctrl-x:change-prompt(πŸ“  )+reload(sesh list -z)' \
        --bind 'ctrl-f:change-prompt(πŸ”Ž  )+reload(fd -H -d 2 -t d -E .Trash . ~)' \
        --bind 'ctrl-d:execute(tmux kill-session -t {})+change-prompt(⚑  )+reload(sesh list -i)'

I get:

image

If I run:

sesh list -i

I get the expected result:

image

My fzf version is:

> fzf --version
0.49.0 (brew)
joshmedeski commented 1 month ago

Thanks for the feedback, so it appears to break the Nerd Font rendering Β only when sesh starts the tmux session.

I will do some investigation, sometimes it's related to the default terminal setting, try checking this value or setting it in your tmux.conf:

set -g default-terminal "screen-256color"

Other times, it can be unicode support problem, which came be set in your tmux.conf as well:

set -g utf8
setw -g utf8 on

Can you experiment with these settings and see if it helps? I can setup a VM and try and recreate the issue, or ask my community if anyone else uses sesh with Ubuntu, but let's see if updating the configuration can fix it first, thanks!

Hugo-Persson commented 1 month ago

@SuyashPatil-29 could you try restarting your computer without changing anything in your tmux.conf? I tried it now and fixed everything for me, maybe something weird when changing from the old plugin to the new plugin?

SuyashPatil-29 commented 1 month ago

Interesting, how are you calling sesh? Just directly in the terminal "sesh connect 'ai-roadmap-generator'"?

Also, if you run this outside of tmux, do you see icons?

sesh list -i

When I run

sesh list -i

I do see my icons. Its only when I use sesh connect i get the problem. BTW I use kitty as my terminal emulator.

And yes "sesh connect 'ai-roadmap-generator'" is what I did to directly jump into a session.

SuyashPatil-29 commented 1 month ago

@SuyashPatil-29 could you try restarting your computer without changing anything in your tmux.conf? I tried it now and fixed everything for me, maybe something weird when changing from the old plugin to the new plugin?

I did try this. I have had this issue about a month ago too. I decided to not use sesh then but now that I tried again hoping it would be fixed, its the same again.

SuyashPatil-29 commented 1 month ago

Thanks for the feedback, so it appears to break the Nerd Font rendering Β only when sesh starts the tmux session.

I will do some investigation, sometimes it's related to the default terminal setting, try checking this value or setting it in your tmux.conf:

set -g default-terminal "screen-256color"

Other times, it can be unicode support problem, which came be set in your tmux.conf as well:

set -g utf8
setw -g utf8 on

Can you experiment with these settings and see if it helps? I can setup a VM and try and recreate the issue, or ask my community if anyone else uses sesh with Ubuntu, but let's see if updating the configuration can fix it first, thanks!

I did this and it did not help. I dont think its a problem with my kitty conf as it renders everything else properly

joshmedeski commented 1 month ago

Have you tried a different terminal emulator? If it's just kitty that's not working that will help me in debugging what could be the root cause.

karamanliev commented 1 month ago

I have the same issue on mac

If I run:

sesh list -i | fzf-tmux -p 55%,60% \
      --no-sort --border-label ' sesh ' --prompt '⚑  ' \
      --header '  ^a all ^t tmux ^g configs ^x zoxide ^d tmux kill ^f find' \
      --bind 'tab:down,btab:up' \
      --bind 'ctrl-a:change-prompt(⚑  )+reload(sesh list)' \
      --bind 'ctrl-t:change-prompt(πŸͺŸ  )+reload(sesh list -t)' \
      --bind 'ctrl-g:change-prompt(βš™οΈ  )+reload(sesh list -c)' \
      --bind 'ctrl-x:change-prompt(πŸ“  )+reload(sesh list -z)' \
      --bind 'ctrl-f:change-prompt(πŸ”Ž  )+reload(fd -H -d 2 -t d -E .Trash . ~)' \
      --bind 'ctrl-d:execute(tmux kill-session -t {})+change-prompt(⚑  )+reload(sesh list -i)'

I get: image

If I run:

sesh list -i

I get the expected result: image

My fzf version is:

> fzf --version
0.49.0 (brew)

I can report that I have absolutely the same issue on mac and linux with wezterm terminal. Everything is updated to the latest available version.

I've managed to make it working for me with the following tmux bind:

bind-key "r" run-shell "sesh connect \"$(
    sesh list -i | fzf-tmux -p 55%,60% --layout=reverse --ansi \
        --no-sort --border-label ' sesh ' --prompt '⚑  ' \
        --header '  ^a all ^t tmux ^g configs ^x zoxide ^d tmux kill ^f find' \
        --bind 'tab:down,btab:up' \
        --bind 'ctrl-a:change-prompt(⚑  )+reload(sesh list -i)' \
        --bind 'ctrl-t:change-prompt(πŸͺŸ  )+reload(sesh list -t -i)' \
        --bind 'ctrl-g:change-prompt(βš™οΈ  )+reload(sesh list -c -i)' \
        --bind 'ctrl-x:change-prompt(πŸ“  )+reload(sesh list -z -i)' \
        --bind 'ctrl-f:change-prompt(πŸ”Ž  )+reload(fd -H -d 2 -t d -E .Trash . ~)' \
        --bind 'ctrl-d:execute(tmux kill-session -t $(echo {} | cut -c3-))+change-prompt(⚑  )+reload(sesh list -i)'
)\""

Thanks for the great app, I love it! πŸ‘Š

SuyashPatil-29 commented 1 month ago

I have the same issue on mac If I run:

sesh list -i | fzf-tmux -p 55%,60% \
        --no-sort --border-label ' sesh ' --prompt '⚑  ' \
        --header '  ^a all ^t tmux ^g configs ^x zoxide ^d tmux kill ^f find' \
        --bind 'tab:down,btab:up' \
        --bind 'ctrl-a:change-prompt(⚑  )+reload(sesh list)' \
        --bind 'ctrl-t:change-prompt(πŸͺŸ  )+reload(sesh list -t)' \
        --bind 'ctrl-g:change-prompt(βš™οΈ  )+reload(sesh list -c)' \
        --bind 'ctrl-x:change-prompt(πŸ“  )+reload(sesh list -z)' \
        --bind 'ctrl-f:change-prompt(πŸ”Ž  )+reload(fd -H -d 2 -t d -E .Trash . ~)' \
        --bind 'ctrl-d:execute(tmux kill-session -t {})+change-prompt(⚑  )+reload(sesh list -i)'

I get: image If I run:

sesh list -i

I get the expected result: image My fzf version is:

> fzf --version
0.49.0 (brew)

I can report that I have absolutely the same issue on mac and linux with wezterm terminal. Everything is updated to the latest available version.

I've managed to make it working for me with the following tmux bind:

bind-key "r" run-shell "sesh connect \"$(
    sesh list -i | fzf-tmux -p 55%,60% --layout=reverse --ansi \
        --no-sort --border-label ' sesh ' --prompt '⚑  ' \
        --header '  ^a all ^t tmux ^g configs ^x zoxide ^d tmux kill ^f find' \
        --bind 'tab:down,btab:up' \
        --bind 'ctrl-a:change-prompt(⚑  )+reload(sesh list -i)' \
        --bind 'ctrl-t:change-prompt(πŸͺŸ  )+reload(sesh list -t -i)' \
        --bind 'ctrl-g:change-prompt(βš™οΈ  )+reload(sesh list -c -i)' \
        --bind 'ctrl-x:change-prompt(πŸ“  )+reload(sesh list -z -i)' \
        --bind 'ctrl-f:change-prompt(πŸ”Ž  )+reload(fd -H -d 2 -t d -E .Trash . ~)' \
        --bind 'ctrl-d:execute(tmux kill-session -t $(echo {} | cut -c3-))+change-prompt(⚑  )+reload(sesh list -i)'
)\""

Thanks for the great app, I love it! πŸ‘Š

Thanks a ton man this works perfectly fine for me.

joshmedeski commented 1 month ago

Awesome, thanks everyone for the feedback and help!

SuyashPatil-29 commented 1 month ago

sesh connect ai-roadmap-generator still does not render the nerd fonts tho @joshmedeski

joshmedeski commented 1 month ago

Hmm, did you confirm the Nerd Fonts render in a different terminal emulator?

marcellmartini commented 1 month ago

What is the NerdFonts and Tmux version?

SuyashPatil-29 commented 1 month ago

Hmm, did you confirm the Nerd Fonts render in a different terminal emulator?

I did try using the native ubuntu terminal and its the same thing

SuyashPatil-29 commented 1 month ago

What is the NerdFonts and Tmux version?

SF Mono nerd font but i also tried it with many other nerd fonts and its the same thing

and the tmux version is 3.2a

marcellmartini commented 1 month ago

What is the NerdFonts and Tmux version?

SF Mono nerd font but i also tried it with many other nerd fonts and its the same thing

and the tmux version is 3.2a

I ask the version of Nerdfonts because some time ago the download link on the Nerdfonts page was not up to date. Downloading from the website the version font was 2.4 and download the font from GitHub repo the version was 3.2.

I checked today and the versions are equal on the website and in the GitHub repo. Would you happen to know what version you installed the Nerdfont?

I have some issues with the missing Fonts because of this version difference.

joshmedeski commented 1 month ago

Thanks for the feedback, @SuyashPatil-29.

I'm currently rewriting the code to make testing and debugging easier. Please bear with me as this process will take a few weeks. I'll look into this issue as soon as possible, but it's not my top priority right now since I have limited time outside my day job.

SuyashPatil-29 commented 1 month ago

What is the NerdFonts and Tmux version?

SF Mono nerd font but i also tried it with many other nerd fonts and its the same thing and the tmux version is 3.2a

I ask the version of Nerdfonts because some time ago the download link on the Nerdfonts page was not up to date. Downloading from the website the version font was 2.4 and download the font from GitHub repo the version was 3.2.

I checked today and the versions are equal on the website and in the GitHub repo. Would you happen to know what version you installed the Nerdfont?

I have some issues with the missing Fonts because of this version difference.

I did not download from the web page, i cloned the git repo and patched the fonts myself and they render well when i use tmux or neovim normally so thats not a problem ig.

SuyashPatil-29 commented 1 month ago

Thanks for the feedback, @SuyashPatil-29.

I'm currently rewriting the code to make testing and debugging easier. Please bear with me as this process will take a few weeks. I'll look into this issue as soon as possible, but it's not my top priority right now since I have limited time outside my day job.

Thanks a lot josh i can still manage without the sesh connect I am here so that this issue would be resolved causing others no trouble.