Open scabala opened 9 months ago
I have a feeling this might be feature - I have seen that when I change keybinds in my zellij.kdl
, they are applied when I detach and attach to session - no session killing required. That's very nice feature, keybinds are somehow propagated from zellij client attaching to session.
And it made me think... What if we need to specify layout with keybind when attaching to it? So, in addition to scenario described above, let's try attaching with specifying layout:
zellij -l ./layout.kdl attach test
and it works just fine.
Honestly, I do not know if this behavior can be called a bug. More like a side effect of zellij client being in charge of keybinds instead of zellij server.
Hey @scabala - thanks for reminding me about this issue and I'm sorry I did not get to it sooner.
I'll be honest - I'm not sure what the right sort of behavior here should be. Let's say for example that we change this behavior, so that keybindings defined in the layout that started the session will be kept throughout.
There is no indication that this is happening, so if you connect to this session at a later time, you might not understand why the keybindings are different. Furthermore, now with the config live-reloading in place, if you change the configuration file itself, these layout keybindings should be applied on top of the configuration keybindings (as they were when the session was created). So you'll be in a situation where if you change (for example) the configuration keybindings to:
keybindings clear-defaults=true { }
you'll still have keybindings that are coming from... somewhere?
The more I think about it, the more I feel that defining keybindings in layouts might have been a bad idea. Or at least, not fitting with where the project progressed to. What do you think? Would you maybe like to share more about your use-case so that we can figure out a good approach?
1. Graphical issue inside a terminal pane (eg. something does not look as it should)
/tmp/zellij-1000/zellij-log
, ie withcd /tmp/zellij-1000/
andrm -fr zellij-log/
(/tmp/
is$TMPDIR/
on OSX)zellij --debug
stty size
, copy the result and attach it in the bug reportPlease attach the files that were created in
/tmp/zellij-1000/zellij-log/
to the extent you are comfortable with.Basic information
zellij --version
: zellij 0.39.2stty size
: 47 212uname -av
orver
(Windows):Linux personal 6.6.13-100.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Jan 20 17:28:45 UTC 2024 x86_64 GNU/Linux
Further information
Reproduction steps, noticeable behavior, related issues, etc
2. Issues with the Zellij UI / behavior / crash
Issue description
I have a custom layout with custom keybindings. When I create a session, keybinds work. If I detach and attach to it, they does not work - they go to current's pane shell.
Minimal reproduction
layout.kdl
zellij --layout ./layout.kdl --session test
Ctrl+a
3.1 It should show new pane with command executedCtrl+o, d
)zellij attach test
Ctrl+a
again 6.1 It will not spawn new pane, just produce character in current paneOther relevant information
If I had to point a finger on line from logs, it would be this line:
but I did not make any serious debugging with this.
And here's the
zellij.log
file in it's entirety:zellij.log
``` WARN |zellij_utils::input::layo| 2024-02-07 17:26:12.169 [main ] [zellij-utils/src/input/layout.rs:1035]: Failed to read swap layout file: ./layout.swap.kdl. Error: Os { code: 2, kind: NotFound, message: "No such file or directory" } ERROR |zellij::sessions | 2024-02-07 17:26:12.175 [main ] [src/sessions.rs:56]: Failed to read resurrection layout file: Os { code: 2, kind: NotFound, message: "No such file or directory" } ERROR |zellij::sessions | 2024-02-07 17:26:12.175 [main ] [src/sessions.rs:56]: Failed to read resurrection layout file: Os { code: 2, kind: NotFound, message: "No such file or directory" } ERROR |zellij::sessions | 2024-02-07 17:26:12.175 [main ] [src/sessions.rs:56]: Failed to read resurrection layout file: Os { code: 2, kind: NotFound, message: "No such file or directory" } ERROR |zellij::sessions | 2024-02-07 17:26:12.175 [main ] [src/sessions.rs:56]: Failed to read resurrection layout file: Os { code: 2, kind: NotFound, message: "No such file or directory" } ERROR |zellij::sessions | 2024-02-07 17:26:12.175 [main ] [src/sessions.rs:56]: Failed to read resurrection layout file: Os { code: 2, kind: NotFound, message: "No such file or directory" } ERROR |zellij::sessions | 2024-02-07 17:26:12.175 [main ] [src/sessions.rs:56]: Failed to read resurrection layout file: Os { code: 2, kind: NotFound, message: "No such file or directory" } ERROR |zellij::sessions | 2024-02-07 17:26:12.175 [main ] [src/sessions.rs:56]: Failed to read resurrection layout file: Os { code: 2, kind: NotFound, message: "No such file or directory" } ERROR |zellij::sessions | 2024-02-07 17:26:12.175 [main ] [src/sessions.rs:56]: Failed to read resurrection layout file: Os { code: 2, kind: NotFound, message: "No such file or directory" } ERROR |zellij::sessions | 2024-02-07 17:26:12.175 [main ] [src/sessions.rs:56]: Failed to read resurrection layout file: Os { code: 2, kind: NotFound, message: "No such file or directory" } INFO |zellij_client | 2024-02-07 17:26:12.175 [main ] [zellij-client/src/lib.rs:159]: Starting Zellij client! INFO |zellij_server | 2024-02-07 17:26:12.193 [main ] [zellij-server/src/lib.rs:246]: Starting Zellij server! INFO |zellij_server | 2024-02-07 17:26:12.196 [main ] [zellij-server/src/lib.rs:919]: Compiling plugins using Cranelift INFO |zellij_server::plugins | 2024-02-07 17:26:12.198 [wasm ] [zellij-server/src/plugins/mod.rs:149]: Wasm main thread starts INFO |zellij_utils::input::plug| 2024-02-07 17:26:12.212 [async-std/runti] [zellij-utils/src/input/plugins.rs:150]: Plugin 'tab-bar.wasm' exists in the 'PLUGIN DIR' at '/home/