-
Notifications
You must be signed in to change notification settings - Fork 2
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
Ctrl+g always immediately unlocks after locking #11
Comments
Dug into it a little bit -- it appears that the "Os" might be the result of a bug in the parsing of home.rs's layout dir. I've set the layout dir in my config.kdl manually and hardcoded it to ~/.config/zellij/layouts, and dumped the default layout there. Doesn't seem to have resolved it though; can't quiiiite tell exactly where the issue is, i'm not a rust guy and my debuggers are acting up a bit. |
In your config, swap any reference to 'Alt z' with 'Ctrl g'. The former is what I have configed; they later is the Zellij default key for unlocking. See this related issue and a link to my dotfiles near the bottom. |
Got it, that seems to have resolved. Just adopted your whole zellij+alacritty config, actually, i guess we'll see how it goes, lol. but presumably not a bug, just a misconfiguration, so i'll close here |
it seems that i spoke too soon -- when vim is open, the same behavior is exhibited, despite having adopted your dotfiles, heh. I've tried using alt+z and alt+shift+z as well as swapping back to ctrl+g -- when i go back to my ctrl + g config, i can observe a quick flip between locked and unlocked with nvim open, but in both cases, ctrl + g (or alt z) immediately unlocks. Alt shift z doesn't enable or disable the plugin if i leave it in the config, I experimented with changing it to Ctrl shift g, but same behavior: detects a command, but doesn't enable or disable autolock or change the 'immediate unlock' behavior. I'll drop the config again for ref (current behavior is as described above)
|
I'm experiencing the same behaviour on:
Debugging this is a bit ouf my depth, but would love to provide more information if I can. |
I hope to, one day, more comprehensive docs, or a video tutorial, or some additional resources to help connect-the-dots for folks. Until then, this project's README and my Zellij config are all I can point to. I will also say that a key aspect of my Zellij config is that they clear all of Zellij's built-in bindings using:
@twilwa, the config you posted does not include this. Perhaps you could try. |
Removing the "bug" label since this is most likely a config issue. |
I've tried the exact same keybinds configuration as you linked and I still have the exact same issue with neovim, everything else works fine |
The issue is that neovim doesn't automatically lock the session however locking it manually unlocks it immediatly. Only happens with nvim |
I'm having this exact same issue, which started after I made some changes to my zsh config (mainly migrating to zinit) so that might be related. On logs I only see
No matter what I do or which command I execute (whether I execute nvim or not), I always see |
In the meantime I'm using autocmds to lock/unlock: local function zellij(mode)
vim.schedule(function()
if vim.env.ZELLIJ ~= nil then
vim.fn.system({ "zellij", "action", "switch-mode", mode })
end
end)
end
vim.api.nvim_create_autocmd({ "FocusGained", "BufEnter" }, {
group = augroup("zellij_lock"),
callback = function()
zellij("locked")
end,
})
vim.api.nvim_create_autocmd({ "FocusLost", "VimLeave" }, {
group = augroup("zellij_normal"),
callback = function()
zellij("normal")
end,
}) |
I just released zellij-autolock v0.2.2. In this release, I added more log output to help troubleshoot these sorts of issues. Note that printing to the Zellij log is only enabled when given the option
If you consistently see nothing but " If that is not the case, please post details of your issue along with pertinent log entries that may help in debugging. |
zellij --version
: ___ 0.41.2Terminal version: ___ Alacritty 0.13.2, Cosmic Term ??
Operating system: ___ Pop! OS 24.04 alpha epoch 2
Issue description
When pressing ctrl+g inside of nvim or zellij, zellij immediately unlocks, rendering the plugin nonfunctional.
Minimal reproduction
Fresh zellij installation, dump setup from docs, https://zellij.dev/documentation/configuration
Other relevant information
these are the logs, so I looked for the file:
~ via S
❯ cd /home/anon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zellij-utils-0.41.2/src/input/
zellij-utils-0.41.2/src/input via 🦀 v1.81.0
❯ ls
╭────┬───────────────┬──────┬──────────┬────────────────╮
│ # │ name │ type │ size │ modified │
├────┼───────────────┼──────┼──────────┼────────────────┤
│ 0 │ actions.rs │ file │ 31.6 KiB │ 18 years ago │
│ 1 │ command.rs │ file │ 3.7 KiB │ 18 years ago │
│ 2 │ config.rs │ file │ 31.6 KiB │ 18 years ago │
│ 3 │ keybinds.rs │ file │ 4.8 KiB │ 18 years ago │
│ 4 │ layout.rs │ file │ 69.4 KiB │ 18 years ago │
│ 5 │ mod.rs │ file │ 5.5 KiB │ 18 years ago │
│ 6 │ mouse.rs │ file │ 3.3 KiB │ 18 years ago │
│ 7 │ options.rs │ file │ 16.1 KiB │ 18 years ago │
│ 8 │ permission.rs │ file │ 1.9 KiB │ 18 years ago │
│ 9 │ plugins.rs │ file │ 8.1 KiB │ 18 years ago │
│ 10 │ theme.rs │ file │ 4.0 KiB │ 18 years ago │
│ 11 │ unit │ dir │ 4.0 KiB │ 16 minutes ago │
╰────┴───────────────┴──────┴──────────┴────────────────╯
layout.rs is right there, so i'm not sure what it's complaining about. I assumed I messed something up and reinstalled zellij from the top, but the issue doesn't seem to have resolved. Here's config.kdl:
I feel like I must be missing something, but running it back from the top should have fixed it if so. I haven't reinstalled the nvim side, figured if I can't get consistent lock behavior from zellij then nvim won't do any good.
The text was updated successfully, but these errors were encountered: