zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
21.18k stars 644 forks source link

Availability to switch tab in locked mode #2792

Closed cheremuhinikita closed 1 year ago

cheremuhinikita commented 1 year ago

Expected behavior When locked mode enable, switching tab by click (with compact-bar or tab-bar plugins) should not work

Actual behavior When locked mode enable, switching tab by click (with compact-bar or tab-bar plugins) work

Reproduction steps:

  1. Run zellij with compact-bar or tab-bar plugins, usually I run through compact layout - zellij --layout compact
  2. Add new tab (by default keybind Ctrl t n)
  3. Switch to locked mode (by default keybind Ctrl g)
  4. Try click on the second tab, switching to second tab works

Basic information

zellij --version: 0.38.2 stty size: 42 169 uname -av or ver(Windows): Darwin MacBook-Pro-Cheremuhin.local 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul 5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000 arm64

List of programs you interact with as: wezterm --version: wezterm 20230712-072601-f4abf8fd

imsnif commented 1 year ago

Can I ask why? What is this interfering with?

cheremuhinikita commented 1 year ago

Want to clarify the situation. I noticed strange behavior about work with tabs in locked mode: when I enable lock mode everything is blocked except them, so I can't switch tab using keybind, but I can switch tab using mouse click. E.g. I sometimes missclick switch to tab when locked mode is on. Maybe this behavior is built-in, but as user I find it weird.

Perhaps, within this PR worth add disabled tab display, when locked mode is on, for better UX. What do you think?

imsnif commented 1 year ago

I get where you're coming from, but thanks for the clarification to make sure we're all on the same page.

The Locked Mode is there primarily to allow users to send keypresses to the underlying application running inside a Zellij pane without them being intercepted by the Zellij interface. Unless there's a similar issue here which I can't think of (please enlighten me if I'm missing something), I'd rather allow users to do this rather than deny it. For all I know some people are relying on this for their workflow.

cheremuhinikita commented 1 year ago

Seems I was confused by display text - -- INTERFACE LOCKED -- in status-bar, so I thought locked mode was intended to disable all interface actions. Okay, I understand. I'll close this issue then

imsnif commented 1 year ago

Appreciate you bringing this up though!