Closed Vagr9K closed 1 year ago
Thanks for the PR. I think this may be fine, but I'm interested in wezterm and will try it out more sometime in the next month or so and see if there happens to be some better solution.
Wezterm is awesome. Goodbye tmux.
Yeah, this is the right approach. I re-arranged it a bit and added some extra commentary, so it looks like github didn't detect the merge, but it should be fixed. Thanks for pointing this out. It looks like the issue also happened when using connect unix
.
When Wezterm is launched with a custom configuration path (for example:
wezterm --config-file="$HOME/.config/wezterm/wezterm.dropdown.lua"
) it causes the new instance to be launched in a new process.Other options, such as setting a custom
class
/window
names also cause Wezterm to create a new process instead of reusing the existing one.On latest Git version of
tdrop
this causes timeout errors combined with duplicate dropdowns being spawned on toggle, as long as there is a Wezterm instance running in the background.This seems to have been caused by this commit.
Steps to reproduce:
wezterm
(settings/environment don't matter)tdrop wezterm --config-file="$HOME/.config/wezterm/wezterm.lua"
(you can also point it to the main configuration or runtrdop wezterm start --always-new-process
to replicate the same issue, since all of these commands force wezterm to run in a new process)Workarounds
Commenting out (https://github.com/noctuid/tdrop/blob/master/tdrop#L810) fixes the issue but breaks the behavior for
wezterm
instances running in the same process.Keep in mind that it takes a while for the new Wezterm process to spawn, so when running
pgrep
at that line, only the already existing PID gets captured, not the new one.The possible fix
The change in this PR fixes the problem on my end, without breaking the behavior for single-process Wezterm instances. That being said I'm not sure if this is the best solution in this case.