class Automux::Core::Tmux::Window

Attributes

data[R]
index[R]
session[R]

Public Class Methods

new(session, window_data) click to toggle source
# File lib/automux/core/tmux/window.rb, line 14
def initialize(session, window_data)
  @session = session
  @hooks = []
  @options = []
  @panes = []
  @data = Data.new(window_data)
  @index = @data.index
end

Public Instance Methods

change_root_command() click to toggle source
# File lib/automux/core/tmux/window.rb, line 53
def change_root_command
  %[cd #{ root }]
end
has_panes?() click to toggle source
# File lib/automux/core/tmux/window.rb, line 43
def has_panes?
  !@panes.nil?
end
opted_in?() click to toggle source
# File lib/automux/core/tmux/window.rb, line 47
def opted_in?
  return true unless is_optional?

  data.opt
end
set_option(option) click to toggle source
# File lib/automux/core/tmux/window.rb, line 39
def set_option(option)
  %[tmux set-window-option -t #{ session.name }:#{ index } #{ option.name } '#{ option.value }']
end