zellij-autolock icon indicating copy to clipboard operation
zellij-autolock copied to clipboard

bug: toggle floating does not properly unlock

Open JonnyLoughlin opened this issue 5 months ago • 4 comments

zellij --version: zellij 0.41.0

Terminal version: foot version: 1.18.1 +pgo +ime +graphemes -assertions

Operating system: Linux 6.10.10-arch1-1 #1 SMP PREEMPT_DYNAMIC x86_64 GNU/Linux

Issue description

When toggling floating panes in a window that is locked by a program defined in triggers, the ui is not unlocked.

Minimal reproduction

Zellij Config:

plugins {
    autolock location="file:/home/jonny/.config/zellij/zellij-autolock.wasm" {
        triggers "nvim"
    }
}

keybinds {
    normal {
        bind "Enter" {
            WriteChars "\u{000D}";
            MessagePlugin "autolock" {};
        }
    }
    shared_except "normal" "locked" {
        bind "Esc" { SwitchToMode "Normal"; }
    }
    // Standard Mode Bindings
    shared_except "locked" {
        bind "Alt ." { SwitchToMode "Locked"; }
        // Floating Settings
        bind "Alt o" { ToggleFloatingPanes; }
    }
}
  1. Open two panes
  2. Open Neovim in one pane
  • :!zellij action move-focus-or-tab right moves focus and unlocks the ui.
  • :!zellij action toggle-floating-panes opens the floating pane but the ui is still locked.

Other relevant information

Thanks for the work on this! I tried taking a swing at getting this fixed but its been a few years since I've even touched Rust and I've never done much with it. Maybe I am not correctly configuring for this use case so any help would be great!

JonnyLoughlin avatar Sep 17 '24 13:09 JonnyLoughlin