omerxx / tmux-sessionx

A Tmux session manager, with preview, fuzzy finding, and MORE
GNU General Public License v3.0
714 stars 63 forks source link

Tmuxinator integration #56

Closed lcensies closed 5 months ago

lcensies commented 6 months ago

Description

There is a number of tmux session managers like tmuxinator or tmuxp that allow you to open a session defined in yaml format .

# ~/.tmuxinator/project.yml
windows:
  - editor:
      layout: main-vertical
      # Synchronize all panes of this window, can be enabled before or after the pane commands run.
      # 'before' represents legacy functionality and will be deprecated in a future release, in favour of 'after'
      # synchronize: after
      panes:
        - vim
        - guard
  - server: bundle exec rails s
  - logs: tail -f log/development.log

While tmux-sessionx is the most convinient session manager I have seen so far, for projects with predefined layouts I firstly have to create a session in shell as follows:

alias tx="tmuxinator"
tx project

and only then use tmux-sessionx for switching.

Proposal

It would be awesome to have integration with any of these tools with option such as

set -g @sessionx-tmuxinator-mode 'on'

so that tmux-sessionx will include available predefined sessions for creation/switching

ProgmRuanSilva commented 6 months ago

Hey @lcensies thanks for the proposal

You can explain more about the proposal?

omerxx commented 6 months ago

I think this is doable. Probably involves something along the lines of

omerxx commented 6 months ago

Hey @lcensies and @ProgmRuanSilva Please checkout #70 where I added an integration to both listing and starting tmuxinator projects.

@lcensies If you could test the functionality that would be great (you can set your plugin to omerxx/tmux-sessionx#tmuxinator-intergration)

@ProgmRuanSilva I'd be happy if you could do the same just for sanity (changed some shellcheck suggestions, all seem to be working as expected but another pair of eyes like your could help a lot :) )

omerxx commented 6 months ago

@lcensies Do you thing tmuxp is also required here?