laperlej / zellij-sessionizer

MIT License
10 stars 3 forks source link

[BUG] Directory is not set when switching session #1

Closed elythh closed 1 month ago

elythh commented 1 month ago

Hello, I love the idea of bringing sessionizer to Zellij ! \ I know it's still in the early stage but I wanted to report a bug I currently have (using 0.3.0).

When changing session, the newly created one CWD isn't set to the desired path. Tell me if I can provide useful logs or informations.

Demo https://github.com/user-attachments/assets/2a0ab07d-2d71-4818-b3ec-fa262009113e

laperlej commented 1 month ago

Hey thanks for the report and the video. I can't replicate, can you share the relevant parts of your zellij config ?

elythh commented 1 month ago

Sure ! Here's the code section for settings the keybinding and the plugin. It's basically the default config

https://github.com/elythh/flake/blob/6578a8e90db86c4324d0959338faf4a59b01d016/modules/home/opt/shell/zellij/default.nix#L82-L89

laperlej commented 1 month ago

It's a layout problem, cwd seems to just be ignored when zellij fallsback to default_layout. As a temporary fix you can copy your layout to a file called default.kdl, this will prevent the fallback.

I will add a config option today or tomorrow to let users choose their layout, which should fix this.

elythh commented 1 month ago

Thanks for looking into it !

elythh commented 1 month ago

Indeed I renamed my layout to Default and that fixed it.