Open sahinakkaya opened 10 months ago
That shouldn't happen, the new Tmux version might've broken our hack. It's working with Tmux 3.3a, I'll check with the new version and look for a different way to hook into some sort of window switch event. I'd hate to do polling, but that might be the last resort.
I skim through the documentation of kitty and I decided that using kitty with tmux is a crime. Kitty is capable of solving every problem I have with terminal emulators. (Images, ligatures, handling of keyboard and many more...) It is also capable of multiplexing. For anyone reading this, I encourage you to take some time to check what kitty is capable of. You don't need tmux.
Well, as much as I love Kovid, I don't agree with him on that, and I'd say that for me the multiplexer is more important than the terminal emulator.
Kitty is not capable of multiplexing. Multiplexing is not just being able to open multiple pseudoterms inside a terminal display.
Kitty has support for pre-configuring windows and panes on startup with --session, but that's all it does, they're not real sessions and the term probably makes things more confusing for some people, as actual sessions is the critical thing Kitty is not providing.
Of course it's not important for people that don't have terminal sessions deeply integrated into their workflow, and of course it's a hack. But, for me, it's an insane productivity booster I will never give up on.
Of course it's not important for people that don't have terminal sessions deeply integrated into their workflow
Yeah, for me this is the case. I don't use sessions that often. If I think I need sessions, I will try abduco. It is a dead project but might solve this issue.
Hi @3rd, I'm also experiencing this issue and using tmux 3.3a. Switching windows works fine, but adding a new pane or switching to a different session will cause the issue. I'm wondering if this issue is still on the table to look at.
And 2nd you, I can't imagine a life without tmux
I started experiencing this as well. Has this been resolved and I need to bump versions of anything?
NVIM v0.10.0 tmux 3.4 image.nvim
Super weird, works fine for me on Neovim nightly and tmux 3.4, can you share your tmux config?
Of course!
# plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'janoamaral/tokyo-night-tmux'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'joshmedeski/t-smart-tmux-session-manager'
set -g @plugin 'fcsonline/tmux-thumbs'
set -gq allow-passthrough on
set -g status-left-length 30
setw -g mode-keys vi
set -g prefix C-a
unbind-key C-b
set-option -g prefix C-a
unbind-key C-a
bind-key C-a send-prefix
unbind [
bind Escape copy-mode
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind P paste-buffer
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind | split-window -h
bind - split-window -v
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?)(diff)?$'"
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'"
if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'"
bind-key -T copy-mode-vi 'C-h' select-pane -L
bind-key -T copy-mode-vi 'C-j' select-pane -D
bind-key -T copy-mode-vi 'C-k' select-pane -U
bind-key -T copy-mode-vi 'C-l' select-pane -R
bind-key -T copy-mode-vi 'C-\' select-pane -l
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
bind N switch-client -l
set -g default-terminal "screen-256color"
set -g @continuum-restore 'on'
set -g status-interval 5
set -s escape-time 0
set -g base-index 1
setw -g pane-base-index 1
setw -g monitor-activity on
set -g visual-activity on
setw -g mouse on
set-option -g focus-events on
bind-key x kill-pane # skip "kill-pane 1? (y/n)" prompt
set -g detach-on-destroy off # don't exit from tmux when closing a session
set -g @t-fzf-prompt ' ' # customize fzf prompt
set -g renumber-windows on # renumber all windows when any window is closed
set -g history-limit 1000000 # increase history size (from 2,000)
set -g @t-bind "T"
run '~/.tmux/plugins/tpm/tpm'
set -g status-position top
# set -g status-style 'bg=#272727' # set to gruvbox background
set-option -g status-right "" # Hide right status
minimal.lua
:After running minimal lua with
nvim --clean -c ":luafile minimal.lua"
, image is shown correctly but when I switch to another tmux window, the image will still be there.