class Teamocil::Tmux::Pane
Public Class Methods
pane_base_index()
click to toggle source
# File lib/teamocil/tmux/pane.rb, line 17 def self.pane_base_index @pane_base_index ||= Teamocil::Tmux.window_option('pane-base-index', default: 0) end
Public Instance Methods
as_tmux()
click to toggle source
# File lib/teamocil/tmux/pane.rb, line 4 def as_tmux [].tap do |tmux| tmux << Teamocil::Command::SplitWindow.new(root: root, name: name) unless first? tmux << Teamocil::Command::SendKeysToPane.new(index: internal_index, keys: commands.join('; ')) if commands tmux << Teamocil::Command::SendKeysToPane.new(index: internal_index, keys: 'Enter') tmux << Teamocil::Command::SelectLayout.new(layout: layout, name: name) if layout end end
internal_index()
click to toggle source
# File lib/teamocil/tmux/pane.rb, line 13 def internal_index "#{name}.#{index + self.class.pane_base_index}" end
Private Instance Methods
first?()
click to toggle source
# File lib/teamocil/tmux/pane.rb, line 23 def first? index.zero? end