-
-
Notifications
You must be signed in to change notification settings - Fork 681
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
[Request] Display session name in Zellij #573
Comments
Definitely possible! I'd go for top left, something like Shouldn't be too hard to implement, if you or anyone else wants to give it a go? |
I'll give it a go, but if somebody is faster that's fine with me 🙂 |
Awesome. Feel free to reach out here or on our discord if you want help/guidance. |
I tried to get the session name in
But that does not work, because it is not being set. is it because plugins are WASM and are run as separate binaries (and therefor with a different environment?). |
Yeah, I think we don't share the environment variables with the plugins. We use exported WASM functions to communicate with them, and IMO that's the best way to go with this. Atm we don't send the plugins any info on startup and rather have them subscribe to events that we send them every time there's been a change (correct me if I'm wrong @TheLostLambda ?). A good example can be seen with the tabs that subscribe to events here: https://github.com/zellij-org/zellij/blob/main/default-plugins/tab-bar/src/main.rs#L30 And these events are defined here: zellij/zellij-tile/src/data.rs Lines 31 to 36 in c65987a
So I think if you add an event (something like |
Heya! Figured I'd jump in here! There is actually an easier way to go about this, I think! The Normally @imsnif is right about how we communicate with plugins, but the |
I think it might be nice to allow changing the session name at runtime at some point - but for now it indeed doesn't change. Thanks for the suggestion! Could you point out a good place for @techhazard to get started on this? |
As for where to start, I'd point @techhazard to: zellij/zellij-tile/src/data.rs Lines 145 to 151 in 7f67e6d
Personally, I'd add a field like Putting things in the top-left would then mean using the
Eventually (I think) you'll want to pass the session name into this function: zellij/default-plugins/tab-bar/src/line.rs Line 167 in 7f67e6d
You should be able to render it from within there? Good luck and let me know if you run into any issues! |
I usually have at least two sessions open for Zellij; 1 for work (Work), and 1 for personal things (Personal). Sometimes I open other sessions for specific projects.
I'd like to be able to view the name of the session somewhere in Zellij, instead of having to do
env | grep -i zellij
.Perhaps in the top-left, which currently reads "Zellij", or the top right.
Or perhaps somewhere in the bottom bar, just like in Tmux.
I know I can have a different theme for each session, and I'm looking into that, but I like to be able to read the name as well.
Would this be possible?
The text was updated successfully, but these errors were encountered: