joshmedeski / t-smart-tmux-session-manager

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

Tmux Pop-up Failing #88

Closed b4rlw closed 10 months ago

b4rlw commented 10 months ago

After updating, t is not launching the pop-up within Tmux - I updated the plugin itself at the same time as all my brew packages, so unsure which caused this issue (mistake). This issue manifests on both my SIP disabled M2 Mac Mini and my heavily locked down work M2 MBP, though both are running the same plugins and dotfiles.

I have <prefix> T bound to cmd J as per your suggestion in the initial video, but now I just see the cursor flicker in the middle of the screen without the pop-up actually launching. Occasionally, for a split second I will see:

unknown option: ' (Not sure what characters are actually in the space, I just see something similar to this)

This plugin is so good that I now feel lost without it! Any ideas what could be causing this? I believe I'm running the latest version that only requires bash v3.

zoxide 0.9.2
fzf 0.44.1 (brew)
tmux 3.3a
joshmedeski commented 10 months ago

Hmm, can you share your tmux.conf and T_ shell variables? Perhaps it's a bad config.

b4rlw commented 10 months ago

It's more or less a just a modified version of your config:

# ████████╗███╗   ███╗██╗   ██╗██╗  ██╗
# ╚══██╔══╝████╗ ████║██║   ██║╚██╗██╔╝
#    ██║   ██╔████╔██║██║   ██║ ╚███╔╝
#    ██║   ██║╚██╔╝██║██║   ██║ ██╔██╗
#    ██║   ██║ ╚═╝ ██║╚██████╔╝██╔╝ ██╗
#    ╚═╝   ╚═╝     ╚═╝ ╚═════╝ ╚═╝  ╚═╝
# Terminal multiplexer
# https://github.com/tmux/tmux
# cSpell:words christoomey joshmedeski lazygit brightblack nobold gitmux olimorris

set -g default-terminal "${TERM}"
# set -g default-terminal 'screen-256color'
set -g terminal-overrides ',xterm-256color:RGB'
set -g focus-events on # TODO: learn how this works

set -g base-index 1          # start indexing windows at 1 instead of 0
set -g detach-on-destroy off # don't exit from tmux when closing a session
set -g escape-time 0         # zero-out escape time delay
set -g history-limit 1000000 # increase history size (from 2,000)
set -g mouse on              # enable mouse support
set -g renumber-windows on   # renumber all windows when any window is closed
set -g set-clipboard on      # use system clipboard

set -g status-position top
set -g mode-keys vi
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"

bind '%' split-window -c '#{pane_current_path}' -h
bind '"' split-window -c '#{pane_current_path}'
bind c new-window -c '#{pane_current_path}'
bind g new-window -c '#{pane_current_path}' -n 'lazygit' lazygit

bind-key -n C-a send-prefix
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key x kill-pane
bind-key e send-keys "tmux capture-pane -p -S - | nvim -c 'set buftype=nofile' +" Enter

set -g @t-bind 'T'
set -g @t-fzf-find-binding 'ctrl-f:change-prompt(  )+reload(fd -H -d 2 -t d -E .Trash . ~)'
set -g @t-fzf-prompt '  '

set -g @catppuccin_window_left_separator "█"
set -g @catppuccin_window_right_separator "█"
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_middle_separator " █"

set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_text "#W"

set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W"

set -g @catppuccin_status_modules_right "session user host"
set -g @catppuccin_status_left_separator  ""
set -g @catppuccin_status_right_separator "█"
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "yes"

set -g @catppuccin_directory_text "#{pane_current_path}"

set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'joshmedeski/t-smart-tmux-session-manager'
set -g @plugin 'catppuccin/tmux'
set -g @plugin 'tmux-plugins/tpm'

run "$HOME/.config/tmux/plugins/tpm/tpm" # always at end of file

Relevant things from config.fish:

set -Ux FZF_DEFAULT_OPTS "--reverse \
--border rounded \
--no-info \
--pointer='' \
--marker=' ' \
--ansi \
--color='16,bg+:-1,gutter:-1,prompt:4,pointer:5,marker:6'"

set -Ux FZF_TMUX_OPTS "-p \
--reverse \
--border rounded \
--no-info \
--pointer='' \
--marker=' ' \
--ansi \
--color='16,bg+:-1,gutter:-1,prompt:4,pointer:5,marker:6'"

set -Ux FZF_CTRL_R_OPTS "--border-label=' history ' \
--header='ctrl-d: delete' \
--prompt='  '"

fish_add_path ~/.config/tmux/plugins/t-smart-tmux-session-manager/bin
joshmedeski commented 10 months ago

Yeah, all of this looks alright. Did you completely kill your tmux server and try again? Or even restart your computer?

b4rlw commented 10 months ago

Both done, so probably there is some hidden issue with my config here - I'll do some more experimenting. Glad that it passes the sanity check though, thanks!

b4rlw commented 10 months ago

The only other thing that I did was upgrade to Sonoma 14.1.2 - I take it things work as intended for you after the update?

b4rlw commented 10 months ago

Reinstalled macOS from scratch, setup all deps from scratch and it worked. However, after I pasted over my own tmux.conf it stopped working again and now is back to the non-launching state.

Even after removing ~/.config/tmux, tmp/tmux-501, uninstalling Tmux with Brew, restarting the machine and beginning the Tmux installation from scratch again, it still isn't working!

Perhaps Tmux/TPM/t-smart-tmux-session-manager modifies something outside of these directories, that is preserving the brokenness 🤔

joshmedeski commented 10 months ago

Dude, I'm stumped. I used your tmux.conf exactly and I can't recreate your issue.

Can you join my Discord server: https://discord.gg/RQnZH7fFse

I can get on a call and help you one-on-one. (message me on the #tmux channel)

b4rlw commented 10 months ago

That's very generous of you. I've joined the server, but I won't ask for any more of your time until I've exhausted some more possibilities!

b4rlw commented 10 months ago

So, it was a tough one to reproduce, but I don't think it has anything to do with your plugin! I believe this problem relates back to fzf -- and I wasn't being careful enough with my term variables.

Up until recently, it seems like all duplicates were permitted between FZF_DEFAULT_OPTS and FZF_TMUX_OPTS. However, I'm now finding that when:

--no-info
--pointer
--marker
--color

are included in FZF_TMUX_OPTS, it breaks your plugin.

If I simply copy fzf-custom.fish from your dotfiles, things work, as you don't have any of these duplicates present. So it seems like panic over / case closed for now, though I'd be interested to know if you could reproduce this issue with the latest version of fzf!

Cheers.

joshmedeski commented 10 months ago

Great! I'm reworking how fzf variables are set so hopefully in the next few weeks there will be an update that prevents this kind of issue.