ivaaaan / smug

Session manager and task runner for tmux. Start your development environment within one command.
MIT License
712 stars 29 forks source link

Request for `-L` option #79

Closed juboba closed 3 months ago

juboba commented 2 years ago

Tmux has the -L option to specify the socket name (and -S to specify the socket path). This is very useful to group sessions in different sockets (isolated tmux servers).

It would be nice to have this option in smug.

Other tmux managers allow users to set the socket name in the yaml files which I haven't used, but could also be useful.

I have the intention of creating a PR for this, but I would have to learn at least some basic Go to do this 😅

What do you think @ivaaaan? Do you see value in this? Should I create a PR or is it easy for you to do?

Thank you!

ivaaaan commented 2 years ago

Thanks for the suggestion. I don't have much time to work on it myself, but if you have a desire to work on this I will help you with anything. Feel free to reach out, my email is in the profile.

ivaaaan commented 2 years ago

@juboba have you started working on this? I got some free time and thinking about implementing this, or I can help you. Let me know if you have any progress

dufferzafar commented 2 years ago

@ivaaaan I was looking at the code, and I think this could be implemented in the Exec functions of commander.go where we would add the -L / -S socket details to cmd.Args before running a command: https://github.com/ivaaaan/smug/blob/d053a9d41a5926cc6ee6b66d33b97d0424c984b6/commander.go#L28-L57

The -L / -S options could be passed to the commander instance from main.go: https://github.com/ivaaaan/smug/blob/d053a9d41a5926cc6ee6b66d33b97d0424c984b6/main.go#L81

Does that seem right?

ivaaaan commented 2 years ago

@dufferzafar sounds good. Feel free to create a PR, I'll take a look at it :)

aswadsun commented 2 years ago

Hi all, any progress on this feature?

Thanks, Aswad