zellij-org / zellij

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

Feedback: `on_force_close` and `session_serialization` default values #3433

Open Hylian opened 1 week ago

Hylian commented 1 week ago

Hello, I recently switched from tmux to Zellij and I've been loving it! I just wanted to give some feedback on the default values of on_force_close and session_serialization. I configured my shell to automatically launch Zellij, and began using it like my typical tmux workflow: I'll often spawn many temporary terminals and then SIGTERM when finished, with no intention of reattaching. I noticed my Zellij startup and pane creation time was getting increasingly slower (100's of ms), and strace helped me realize that it was due to all the detached sessions.

While I understand that Zellij might have different opinionated default workflows from my own, it does seem like a bit of a footgun for the wiki to encourage configuring your shell for Zellij autostart, only to result in a bunch of dangling sessions that must be manually killed. I think flipping the default value of on_force_close or putting a warning in the wiki would help the new user experience.

(As a side note, I had an issue where delete-all-sessions + kill-all-sessions were not able to find some serialized detached sessions. I had to manually invoke delete-session instead. Not sure if that's a bug, or user error.)