omerxx / tmux-floax

The missing floating pane for Tmux
GNU General Public License v3.0
413 stars 26 forks source link

[Feature request] Floax per session #26

Open idr4n opened 2 months ago

idr4n commented 2 months ago

This is a nice plugin, thank you!

It would be nice to have a floax per session, rather than changing the working directory when on different sessions, for example by creating a scratch-<session-name> session rather than just scratch.

Thanks again!

biehlera commented 2 months ago

yes, this would be very helpful!

omerxx commented 1 month ago

Thanks @idr4n sounds like an interesting idea. I avoided this behavior initially to prevent a bloated list of session (especially if you're a tmux-sessionx user this can become tiring to view and manage. It's definitely possible to extend or at least add a feature. They way I view a flaoting pane is one that's detached from the working environment, hence the path switching option that helps with cases where you'd actually want floax to match itself.

An interesting approach can be actually using the same scratch session but creating windows within in to support different running sessions.

WDYT?

idr4n commented 1 month ago

An interesting approach can be actually using the same scratch session but creating windows within in to support different running sessions

@omerxx I think that would be a nice approach in order to avoid having too many sessions created, and perhaps updating the cwd in the window corresponding to that session if there are more than one window per session.

Another option would be to filter out the pop-up sessions from tmux-sessionx to avoid the clutter of potentially having many those sessions being opened at the same time.

I did come out with a script that creates a pop-up for each session based on your plugin, and the pop-up session mirrors the number of windows in the session (but that's just me as I often have more than one window per session, but I think many people prefer to have one window per session, imo). I think your suggestions would be cleaner and would fit most users.

Thanks again!

omerxx commented 1 month ago

Sounds good! I'll think about the implementation and hope fully get to it soon. Feel free to take over and contribute but just let me know if you do 😉

idr4n commented 1 month ago

Thanks @omerxx

Feel free to take over and contribute but just let me know if you do 😉

Sure, I'd like that. I will try to come out with a draft soon.