Class: Appear::Tmux::Window
- Inherits:
-
TmuxValue
- Object
- Util::ValueClass
- TmuxValue
- Appear::Tmux::Window
- Defined in:
- lib/appear/tmux.rb
Overview
A tmux window. Has many panes.
Instance Method Summary collapse
-
#active? ⇒ Boolean
Is the window active?.
-
#id ⇒ String
Window id.
- #panes ⇒ Array<Pane>
-
#session ⇒ String
Session name.
-
#target ⇒ String
String suitable for use as the “target” specifier for a Tmux command.
-
#window ⇒ Fixnum
Window index.
Methods inherited from TmuxValue
format_string, parse, property, #tmux
Methods inherited from Util::ValueClass
#initialize, properties, property
Constructor Details
This class inherits a constructor from Appear::Util::ValueClass
Instance Method Details
#active? ⇒ Boolean
Returns is the window active?.
182 183 184 185 |
# File 'lib/appear/tmux.rb', line 182 property :active?, :tmux => :window_active, :var => :active, :parse => proc {|b| b.to_i != 0} |
#id ⇒ String
Returns window id.
179 |
# File 'lib/appear/tmux.rb', line 179 property :id, :tmux => :window_id |
#panes ⇒ Array<Pane>
188 189 190 |
# File 'lib/appear/tmux.rb', line 188 def panes tmux.panes.select { |p| p.session == session && p.window == window } end |
#session ⇒ String
Returns session name.
173 |
# File 'lib/appear/tmux.rb', line 173 property :session, :tmux => :session_name |
#target ⇒ String
String suitable for use as the “target” specifier for a Tmux command
195 196 197 198 |
# File 'lib/appear/tmux.rb', line 195 def target # "#{session}:#{window}" id end |
#window ⇒ Fixnum
Returns window index.
176 |
# File 'lib/appear/tmux.rb', line 176 property :window, :tmux => :window_index, :parse => :to_i |