joshmedeski / t-smart-tmux-session-manager

t - the smart tmux session manager
326 stars 51 forks source link

status background is overriden when opening session using t #68

Closed nicos68 closed 1 year ago

nicos68 commented 1 year ago

If I open tmux using the tmux command, the status background color corresponds to what I setup in my config : image However, if I use t myproject to open a new session, my settings are ignored: image Also in this case, my nvim background color is wrong : image whereas in the first case it is correct : image

I set up a minimal reproducible example here : https://codeberg.org/nise/dotfiles/src/branch/t-color-issue/.config/tmux/tmux.conf

nicos68 commented 1 year ago

Ok so it looks like if I run tmux new-session -As "tmux" straight from my shell prompt it works as expected, but if I run it from a script file it reproduces the issue.

Would anyone have any advice ? Even though I concede that this looks more like an alacritty/tmux issue

joshmedeski commented 1 year ago

The -A flag makes new-session behave like attach-session if session-name already exists

Can you confirm if your bug is reintroduced if you run tmux new-session -s "tmux"?

Perhaps it has something to do with the attach mechanism.

nicos68 commented 1 year ago

The -A flag makes new-session behave like attach-session if session-name already exists

Can you confirm if your bug is reintroduced if you run tmux new-session -s "tmux"?

Perhaps it has something to do with the attach mechanism.

No, if I just remove the -A option the issue is not reproduced.

I just made a test with kitty and the colors look right, even when using t. So it looks like an alacritty issue :/ If you're curious you can have a look at my alacritty config here

joshmedeski commented 1 year ago

Alacritty recommends you set the TERM variable directly on your Alacritty config.

env:
  TERM: xterm-256color

https://github.com/joshmedeski/dotfiles/blob/dc421dd1b24dea5bb18fafcede68786ccbdc57ae/.config/alacritty/alacritty.yml#L14

joshmedeski commented 1 year ago

@nicos68 let me know if you're still seeing this issue.

nicos68 commented 1 year ago

Alacritty recommends you set the TERM variable directly on your Alacritty config.

env:
  TERM: xterm-256color

https://github.com/joshmedeski/dotfiles/blob/dc421dd1b24dea5bb18fafcede68786ccbdc57ae/.config/alacritty/alacritty.yml#L14

Thanks, that does fix the issue (after restarting alacritty, which may not be obvious).