Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tmux-continuum doesn't work when .tmux.conf is a symbolic link in WSL 2 #138

Open
kevin-ctera opened this issue Apr 12, 2024 · 3 comments
Open

Comments

@kevin-ctera
Copy link

I recently started using WSL 2 instead of WSL 1. With the change, I found that tmux-continuum was no longer working.

I found it is related to having a symbolic link for .tmux.conf.

$ ls -al .tmux.conf

lrwxrwxrwx 1 kevin kevin 40 Oct 26 11:12 .tmux.conf -> /gdrive/gapps/genv/linux/home/.tmux.conf

I do this because I set up Linux in multiple environments and have to bring up new ones from time to time and can run a script I've created to create links to config files and keep changes/additions in sync between environments.

As a workaround, I've had to change .tmux.conf to a regular file and tell it to source a different file that I update:

$ cat .tmux.conf

# workaround symbolic link issue in WSL 2 for tmux-continuum
source-file /mnt/c/Users/kevin/gdrive/gapps/genv/linux/home/.tmux.conf.main

Plugin content of .tmux.conf.main

$ tail -15 /mnt/c/Users/kevin/gdrive/gapps/genv/linux/home/.tmux.conf.main


# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-strategy-vim 'session' # for vim
set -g @continuum-save-interval '5'
set -g @override_copy_command 'clip.exe'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'

I did not find that any other plug-ins are having issues with the symbolic link in WSL 2 outside of tmux-continuum (EG: prefix + Ctrl-s - save, prefix + Ctrl-r - restore work as expected).

The symbolic link doesn't matter in WSL 1 and all plugins work as expected

Is it possible to determine what causes this behavior and fix it?

@GitBluub
Copy link

Can confirm, I have a similar setup (symlink, wsl2) and same bug for me, the automatic saving works but not restoring when starting tmux

@GitBluub
Copy link

It is fixed with tmux-plugins/tmux-resurrect#289 for me, so not a problem in tmux-continuum i guess

@kevin-ctera
Copy link
Author

@GitBluub thanks for pointing that out. I followed the proposed change in tmux-plugins/tmux-resurrect#289 but it's still not working if I have a link. Are the changes below all you did?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants