Class: Appear::Tmux::Pane
- Inherits:
-
TmuxValue
- Object
- Util::ValueClass
- TmuxValue
- Appear::Tmux::Pane
- Defined in:
- lib/appear/tmux.rb
Overview
A tmux pane.
Instance Method Summary collapse
-
#active? ⇒ Boolean
Is this pane the active pane in this session.
-
#command_name ⇒ String
Command running in this pane.
-
#current_path ⇒ String
Pane current path.
-
#id ⇒ String
Window id.
-
#pane ⇒ Fixnum
Pane index.
-
#pid ⇒ Fixnum
Pid of the process running in the pane.
-
#reveal ⇒ Object
Reveal this pane.
-
#send_keys(keys, opts = {}) ⇒ Object
Send keys to this pane.
-
#session ⇒ String
Session name.
-
#split(opts = {}) ⇒ Object
Split this pane.
-
#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 this pane the active pane in this session.
83 |
# File 'lib/appear/tmux.rb', line 83 property :active?, var: :active, tmux: :pane_active, parse: proc {|a| a.to_i != 0 } |
#command_name ⇒ String
Returns command running in this pane.
86 |
# File 'lib/appear/tmux.rb', line 86 property :command_name, tmux: :pane_current_command |
#current_path ⇒ String
Returns pane current path.
89 |
# File 'lib/appear/tmux.rb', line 89 property :current_path, tmux: :pane_current_path |
#id ⇒ String
Returns window id.
92 |
# File 'lib/appear/tmux.rb', line 92 property :id, :tmux => :pane_id |
#pane ⇒ Fixnum
Returns pane index.
80 |
# File 'lib/appear/tmux.rb', line 80 property :pane, tmux: :pane_index, parse: :to_i |
#pid ⇒ Fixnum
Returns pid of the process running in the pane.
71 |
# File 'lib/appear/tmux.rb', line 71 property :pid, tmux: :pane_pid, parse: :to_i |
#reveal ⇒ Object
Reveal this pane
110 111 112 |
# File 'lib/appear/tmux.rb', line 110 def reveal tmux.reveal_pane(self) end |
#send_keys(keys, opts = {}) ⇒ Object
Send keys to this pane
118 119 120 |
# File 'lib/appear/tmux.rb', line 118 def send_keys(keys, opts = {}) tmux.send_keys(self, keys, opts) end |
#session ⇒ String
Returns session name.
74 |
# File 'lib/appear/tmux.rb', line 74 property :session, tmux: :session_name |
#split(opts = {}) ⇒ Object
Split this pane
105 106 107 |
# File 'lib/appear/tmux.rb', line 105 def split(opts = {}) tmux.split_window(opts.merge(:t => target)) end |
#target ⇒ String
String suitable for use as the “target” specifier for a Tmux command
97 98 99 100 |
# File 'lib/appear/tmux.rb', line 97 def target # "#{session}:#{window}.#{pane}" id end |
#window ⇒ Fixnum
Returns window index.
77 |
# File 'lib/appear/tmux.rb', line 77 property :window, tmux: :window_index, parse: :to_i |