fresh2dev / zellij-autolock

autolock Zellij when certain processes open.
MIT License
58 stars 2 forks source link

on MacOS lock/unlock stops working after first active pane switch #8

Closed kurtome closed 5 days ago

kurtome commented 1 month ago

zellij --version: 0.40.1

Terminal version: Alacritty 0.13.2 (also tested in iTerm)

Operating system: MacOS

Issue description

Switching Panes/Tabs doesn't auto lock or unlock after the first time you open nvim (or any other autolocked program I assume) on the commend line

Minimal reproduction

  1. Open zellij
  2. Create a new pane
  3. Return open nvim, see that you are correctly in "Locked" mode
  4. Change panes with ctrl-h / ctrl-l
  5. EXPECTED: should be in "Normal" mode. ACTUAL: still in "Locked" mode on the new pane.

Similarly, manually toggling to "Normal" mode and then moving back to the nvim pane doesn't change the mode to "Locked"

Other relevant information

Also seeing the flashing pane issue on MacOS, but it only happens once per session

fresh2dev commented 1 month ago

I cannot repro this manually, but I have encountered this behavior when using the same Zellij session for a long period of time (some days). When this happens, you may also notice that the command zellij action list-clients gives empty results. When the command gives empty results, this plugin can't do anything meaningful; it is effectively disabled. In response, I just kill the session and start a new one. It doesn't happen frequently enough for it to be a major impediment to my workflow.

The bug is upstream, so we'll have to see if it is resolved in the next release of Zellij and reassess then.

kurtome commented 1 month ago

No worries, I honestly switched off of tmux style tabs in favor of Wezterm traditional tabs just to reduce the complexity of my setup

fresh2dev commented 2 weeks ago

Just published v0.2.0 of this plugin which takes advantage of the new Zellij API enhancements. Can someone confirm that this resolves whatever issue you were having?

fresh2dev commented 5 days ago

I'll assume so.