GithubHelp home page GithubHelp logo

Enable use with wemux about tmuxinator HOT 27 CLOSED

tmuxinator avatar tmuxinator commented on June 24, 2024
Enable use with wemux

from tmuxinator.

Comments (27)

fsonntag avatar fsonntag commented on June 24, 2024 1

When I try running
tmuxinator start [project], I get the following error:
undefined method `class_eval' for #Tmuxinator::Project:0x00000002931528
Same error also with debugging.
If I try my [project] with tmux it works completely fine. Anybody got some hints on that?

from tmuxinator.

athal7 avatar athal7 commented on June 24, 2024 1

@fsonntag #453

from tmuxinator.

ranska avatar ranska commented on June 24, 2024

Here some intersting link
https://coderwall.com/p/-3i1fg

from tmuxinator.

athal7 avatar athal7 commented on June 24, 2024

@ranska that was my temporary solution :)

from tmuxinator.

ktaragorn avatar ktaragorn commented on June 24, 2024

@athal7 If wemux uses the same command line interface as tmux, take a look at the latest version and the tmux_command setting. You can set it to wemux and it will be called in all places that tmux would have been.

from tmuxinator.

ktaragorn avatar ktaragorn commented on June 24, 2024

First added in #154

from tmuxinator.

athal7 avatar athal7 commented on June 24, 2024

that looks great thanks @ktaragorn, that is still in pre-release thought right?

from tmuxinator.

 avatar commented on June 24, 2024

Yup it's in pre atm. Couple things I still need to do for #100.

from tmuxinator.

athal7 avatar athal7 commented on June 24, 2024

this is definitely a step in the right direction. wemux still seems to not like one of the commands being sent to it. going to try to dig in further

from tmuxinator.

 avatar commented on June 24, 2024

mux debug project is your friend.

from tmuxinator.

athal7 avatar athal7 commented on June 24, 2024

from what i can tell it does not enter the if block with the conditional if [ "$?" -eq 1 ];

then when trying to execute the following, it says that there are no sessions:

if [ -z "$TMUX" ]; then
  wemux -u attach-session -t wemux
else
  wemux -u switch-client -t wemux
fi```

from tmuxinator.

athal7 avatar athal7 commented on June 24, 2024

actually it appears to be having trouble on the first line, which is causing it to not enter the first if block.

$ wemux start-server\; has-session -t wemux 2>/dev/null
To see a list of wemux commands enter 'wemux help' 

from tmuxinator.

 avatar commented on June 24, 2024

Looks like wemux doesn't have a start-server option. wemux isn't a simple wrapper to tmux and I think it'll require a lot more work to get it working properly with tmux.

My first thought would be a separate template.erb specifically for wemux, with an option in the project file, but that seems like a lot of work. Happy to accept PRs though.

from tmuxinator.

athal7 avatar athal7 commented on June 24, 2024

i may have gone a little overboard there, going to pair back the branching a bit. will also remove the reference until it's ready to not spam this issue, feel free to follow on my branch until then https://github.com/athal7/tmuxinator/tree/wemux

from tmuxinator.

athal7 avatar athal7 commented on June 24, 2024

@Soliah curious to hear your thoughts on the latest version here (assuming I or someone else is able to resolve zolrath/wemux#34)

from tmuxinator.

 avatar commented on June 24, 2024

@athal7, this is looking really good!

I do have some ideas on how to structure this with a bit more indirection but for now this should work.

from tmuxinator.

emilsoman avatar emilsoman commented on June 24, 2024

It would be great if we could get this PR merged and cut a release

from tmuxinator.

athal7 avatar athal7 commented on June 24, 2024

@emilsoman unfortunately the delay here is on the linked wemux issue otherwise the commands sent into each pane will be stripped of their whitespace :(

from tmuxinator.

 avatar commented on June 24, 2024

+1 I'd love to use tmuxinator + wemux as well. What's the latest status? Thanks

from tmuxinator.

nfedyashev avatar nfedyashev commented on June 24, 2024

will give gold to whoever fix this

from tmuxinator.

 avatar commented on June 24, 2024

This is linked to zolrath/wemux#34, so if people want to send a PR there to fix this upstream we can get this merged.

from tmuxinator.

athal7 avatar athal7 commented on June 24, 2024

quick update here... if you follow the manual installation path in wemux, wemux behaves as we would like to allow this to work, however, the homebrew-installed version of wemux still strips whitespace. i've updated the upstream issue on wemux with that comment.

from tmuxinator.

athal7 avatar athal7 commented on June 24, 2024

update: the latest version of wemux that is installable by the latest version of homebrew has fixed the send-keys issue. for some reason only one window is created even if more than one are specified. i'll try to revisit the new template and see if there are any missteps.

from tmuxinator.

athal7 avatar athal7 commented on June 24, 2024

thanks @Soliah!

from tmuxinator.

razic avatar razic commented on June 24, 2024

@athal7 this half works.

all of my tmuxinator projects that use the wemux command have the same session name: wemux

https://github.com/tmuxinator/tmuxinator/blob/master/lib/tmuxinator/wemux_support.rb#L15

that means if i try to use mux to start a new session on a different project, it just attaches to whatever is on wemux session, which is not the desired behavior.

shouldn't we remove overriding name?

from tmuxinator.

razic avatar razic commented on June 24, 2024

also here is an example of my mux debug PROJECT

#!/bin/bash
wemux ls 2>/dev/null

if [ "$?" -eq 127 ]; then
  cd /Users/razic/typekit/typekit

  # Run pre command.


  # Create the session and the first window.
  TMUX= wemux new-session -d -s wemux -n vim

  # Set the default path.
  wemux set-option -t wemux -c /Users/razic/typekit/typekit 1>/dev/null

  # Create other windows.
  wemux new-window -c /Users/razic/typekit/typekit -t wemux:1 -n bash


  # Window "vim"

  wemux send-keys -t wemux:0 vim\ . C-m

  # Window "bash"


  wemux select-window -t 0
fi

wemux attach

you will notice that

  # Set the default path.
  wemux set-option -t wemux -c /Users/razic/typekit/typekit 1>/dev/null

is incorrect. there is no -c option for set-option

from tmuxinator.

athal7 avatar athal7 commented on June 24, 2024

@razic you are right re multiple sessions. unfortunately i dont think i'll be able to get to it in the immediate term, but if you want to submit a PR that would be awesome.

What behavior is the issue you mentioned in your debug comment causing issues for your project? Can you submit an example configuration?

from tmuxinator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.