Class: Tmuxall::Layouts::TwoColumns
- Inherits:
-
Base
- Object
- Base
- Tmuxall::Layouts::TwoColumns
show all
- Defined in:
- lib/tmuxall/layouts/two_columns.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #run
Instance Method Details
#create_panes ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/tmuxall/layouts/two_columns.rb', line 7
def create_panes
(1..(@panes_count - 2)).step(2).each do |n|
tmux "splitw"
tmux "selectl even-vertical"
end
if @panes_count > 1
(1...@panes_count).step(2).each do |n|
tmux "selectp -t #{n}"
tmux "splitw -h"
end
end
end
|
#run_commands_in_panes ⇒ Object
21
22
23
24
25
26
|
# File 'lib/tmuxall/layouts/two_columns.rb', line 21
def run_commands_in_panes
(1..@panes_count).each do |n|
tmux "selectp -t #{n}"
tmux %Q{send-keys "#{@commands[n - 1]}\n"}
end
end
|