Added target param to splits
target maps to -t on split-window
This commit is contained in:
parent
ae34459d7c
commit
7369a81413
@ -33,6 +33,7 @@ Teamocil is a tool used to automatically create sessions, windows and splits in
|
||||
width: 50
|
||||
- cmd: memcached -p 11211 -vv
|
||||
height: 25
|
||||
target: bottom-right
|
||||
|
||||
Running `$ teamocil sample` will rename the session to `sample-session` and create a new window named `sample-window` with a layout like this:
|
||||
|
||||
|
@ -34,14 +34,14 @@ module Teamocil
|
||||
window["splits"].each_with_index do |split, index|
|
||||
unless index == 0
|
||||
if split.include?("width")
|
||||
output << "tmux split-window -h -p #{split["width"]}"
|
||||
cmd = "tmux split-window -h -p #{split["width"]}"
|
||||
elsif split.include?("height")
|
||||
cmd = "tmux split-window -p #{split["height"]}"
|
||||
else
|
||||
if split.include?("height")
|
||||
output << "tmux split-window -p #{split["height"]}"
|
||||
else
|
||||
output << "tmux split-window"
|
||||
end
|
||||
cmd = "tmux split-window"
|
||||
end
|
||||
cmd << " -t #{split["target"]}" if split.include?("target")
|
||||
output << cmd
|
||||
end
|
||||
|
||||
# Support single command splits, but treat it as an array nevertheless
|
||||
|
Loading…
Reference in New Issue
Block a user