nested-tmux icon indicating copy to clipboard operation
nested-tmux copied to clipboard

Looses focus on shell exit

Open brauliobo opened this issue 1 year ago • 4 comments

Hello, I'm trying nested-tmux here

Everything seems to work, but when I exit one shell it looses focus to any pane and then all shortcuts stops working!

Maybe it is related to my custom configuration?

brauliobo avatar Mar 18 '23 19:03 brauliobo

I need to figure out a way to fix this. But I've a restore-tmux script that fixes the problem:

#!/bin/bash

TMUX_PARENT=$(basename "$TMUX")
TMUX_PARENT="${TMUX_PARENT%%,*}"

tmux -L "$TMUX_PARENT" source ~/.tmux.conf.d/nested-tmux/active-row.conf

Put it in PATH and launch it when things are broken.

I'll try to come up with a better solution, eventually.

aleclearmind avatar Mar 18 '23 19:03 aleclearmind

@aleclearmind it seems pane-exited hook might work

brauliobo avatar Mar 18 '23 20:03 brauliobo

added set-hook -g pane-exited "run-shell '~/.tmux.conf.d/nested-tmux/restore-tmux'" to active-row.conf that made it work :)

brauliobo avatar Mar 18 '23 20:03 brauliobo

PR?

aleclearmind avatar Mar 18 '23 20:03 aleclearmind