greymd / tmux-xpanes

Awesome tmux-based terminal divider
MIT License
1.96k stars 61 forks source link

Loading .tmux.conf? #107

Closed dzg closed 5 years ago

dzg commented 5 years ago

When I makes changes to ~/.tmux.conf and run tmux the changes are immediate. But xpanes is not seeing the changes. Am I missing something? thanks

greymd commented 5 years ago

xpanes just calls tmux command internaly. ~/.tmux.conf is supposed to be loaded immediately.

Do you set any values in TMUX_XPANES_EXEC ? If not, something might be wrong on your environment but I have no ideas.

linuxmail commented 5 years ago

hi,

very interesting. Having the same issue on a developer VM. It seems, that if xpanes calling "tmux" it does not source (completely) ~/.tmux.conf config. If I call tmux and than running xpanes .. it works. If I run xpanes and than do a "tmux source-file .tmux.conf", it works too. But it has nothing todo with the version of xpanes, but the config from tmux I would say. Our developer using https://github.com/gpakosz/.tmux and the only thing he wants: disable syncronize-panes with C-s ... It wasn't working ... so digging deeper later.

linuxmail commented 5 years ago

hi,

found the issue for me:

@dzg Do you have the tmux "setting escape-time" or "repeat-time" ? If so, disable them any try again.

greymd commented 5 years ago

That sounds interesting. But I cannot reproduce the issue..

@dzg @linuxmail Could you let me know your version of tmux, xpanes, shell and OS ?

btw, I did not know https://github.com/gpakosz/.tmux , seems very cool :)

c0r3dump3d commented 5 years ago

Hi, I have the same issue in a Manjaro archlinux with tmux 2.8 and I have resolved the issue creating .tmux.conf file and then reinstalling xpanes:

yay -S tmux-xpanes

linuxmail commented 5 years ago

hi,

it was the tTux version 2.3-4 from Debian Stretch.

greymd commented 5 years ago

Hi,

I could re-produce this issue 👍 It is caused by the xpanes's bug. I am going to fix it next version if possible.

Why ?

tmux will keep all the configures provided by .tmux.conf when it starts the new session. And the socket file is associated to the kept configures.

xpanes creates ~/.cache/xpanes/socket file as a default socket file. And the file is loaded even xpanes runs as another process. If the xpanes process is exited suddenly (due to host's down or etc), this file may be left.

Workaround

Remove ~/.cache/xpanes/socket and run xpanes.

***

My investigation history

Environment

$ cat /etc/issue
Debian GNU/Linux 9 \n \l

$ tmux -V
tmux 2.3

$ cat ~/.tmux.conf
=> empty

$ echo $BASH_VERSION
4.4.12(1)-release

Investigation

Terminal 1

$ xpanes 1 2 3
=> show normal tmux session

=> Keep opening the tmux session

Terminal 2

$ echo 'set -g status-right " UPDATED "' > ~/.tmux.conf

$ tmux
=> show "UPDATED" bottom right side.

$ xpanes 1 2 3
=> show normal tmux session ("UPDATED" is not displayed)
greymd commented 5 years ago

Hi folks, v3.1.1 is now released and I believe this bug is fixed. If you find this bug happens with the latest version, please reopen this issue. Thanks!