joshmedeski / sesh

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

Sesh Tmux Sessions Just HANG !!! #119

Open Caivy opened 1 month ago

Caivy commented 1 month ago

What happened?

When I connected to sesh session I expected it to work fine but it's instead hung on me, Sometime it doesn't hang but when i tried to reload Tmux Config it show return 1 and also when Prefix + I in tmux it also return 1.

Video Demo : excuse my stale video

set -g prefix C-a
unbind C-b

set -as terminal-features ",kitty*:RGB"
set -g status-style 'bg=#0b1220 fg=#c2c3c7'
set -g base-index 1
setw -g pane-base-index 1
set -g escape-time 0             # zero-out escape time delay
set -g history-limit 1000000     # increase history size (from 2,000)
set -g renumber-windows on       # renumber all windows when any window is closed
set -g set-clipboard on          # use system clipboard
set -g mouse on
set-window-option -g mode-keys vi
set-option -g status "on"
set -g status-interval 2
set-option -g status-position bottom

bind - split-window -v
bind _ split-window -h

bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'

# vim-like pane switching
bind -r ^ last-window
bind -r k select-pane -U
bind -r j select-pane -D
bind -r h select-pane -L
bind -r l select-pane -R

# pane resize
bind -r Left  resize-pane -L 5
bind -r Down  resize-pane -D 5
bind -r Up    resize-pane -U 5
bind -r Right resize-pane -R 5

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

bind -r D neww -c "#{pane_current_path}" "[[ -e TODO.md ]] && nvim TODO.md"
bind -r R source-file ~/.config/tmux/tmux.conf \; display "Reloaded!"

bind-key -r i run-shell "tmux neww tmux-cht.sh"
bind-key -r p run-shell "~/.local/bin/tmux-sessionizer ~/Documents/personal/"
bind-key -r b run-shell "~/.local/bin/tmux-sessionizer ~/Documents/personal/Obsidian/Second Brain/"
bind-key -r f run-shell "sesh connect \"$(
    sesh list | fzf-tmux -p 57%,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)'
)\""

# bind-key C-a send-prefix

# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'sainnhe/tmux-fzf'
set -g @continuum-restore 'on'
set -g @continuum-save-interval '5'
set -g @resurrect-capture-pane-contents 'on'
# set -g @resurrect-strategy-nvim 'session'

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

tmux just hang can't do anything

Version

1.1.1

Relevant log output

No response

Reviewed

PookieBuns commented 1 month ago

Can you update the video link? it says it's unavailable.

Caivy commented 1 month ago

I no longer have the video files :(

joshmedeski commented 1 month ago

Does tmux ever hang when you create a session without sesh?

What version of tmux are you using?

How did you install sesh?

Getting some more data should help narrow down what could be happening.

Caivy commented 1 month ago

Yes it also hang when creating session with tmux-sessionizer by theprimagen but that's only hang when I reload the tmux config or try to save session by prefix

Tmux 3.4

I downloaded the tar in Releases extract it chmod the file and put it in /usr/bin/

I have been testing it for a while now, I think tmux plugin resurrect and continuum is giving these issues.

joshmedeski commented 1 month ago

Sesh only creates and attaches to sessions. I don't think it would be the root cause of your hanging.

I recommend disabling the other plugins you mentioned one-by-one and see if that problem goes away.