Class: Xing::Managers::TmuxWindow

Inherits:
Tmux
  • Object
show all
Defined in:
lib/xing/managers/tmux.rb

Constant Summary

Constants inherited from Tmux

Xing::Managers::Tmux::MINIMUM_WINDOW_COLUMNS, Xing::Managers::Tmux::MINIMUM_WINDOW_LINES

Instance Attribute Summary

Attributes inherited from Tmux

#shell

Instance Method Summary collapse

Methods inherited from Tmux

available?, #copied_env_vars, #default_env, #env_string, #existing?, #initialize, #rake_command, #session_env, shell, #tmux, #tmux_exe, #wait_all

Constructor Details

This class inherits a constructor from Xing::Managers::Tmux

Instance Method Details

#start_child(name, task) ⇒ Object



175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# File 'lib/xing/managers/tmux.rb', line 175

def start_child(name, task)
  if @first_child
    if tmux 'list-windows -F \'#{window_name}\'' =~ /#{name}/
      puts "It looks like there are already windows open for this tmux?"
      exit 2
    end
  end

  if @first_child and not existing?
    tmux "new-session -d -n '#{name}' '#{rake_command(task)}' \\; set-window-option remain-on-exit on"
  else
    tmux "new-window -n '#{name}' '#{rake_command(task)}' \\; set-window-option remain-on-exit on"
  end
  @first_child = false
end