xing-root 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/xing/managers/tmux.rb +7 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4d7af675457613ad6ced19bdaa1f039485e1c82
|
4
|
+
data.tar.gz: e572d08c0f0e8a0075f90ce30b0a80ade961d73c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36d6191910cab7ab11336bffd546f5c7aefbf1e7a45fa9c1e2348164aa690a67c17ea1b2a93d2929b69b2a4cbcb5bf5fe6b4645a92424f615526d62e2360c165
|
7
|
+
data.tar.gz: c5418a94e4f67d22522b34d4954565cfb9f6e4999a89ec96187b1e0fe7b54db13839a8dcd7052c5dcee4deb90181c9afd0eb8ec7d3bbf6558e7ff8ec2620d7dd
|
data/lib/xing/managers/tmux.rb
CHANGED
@@ -106,13 +106,17 @@ module Xing
|
|
106
106
|
lines = tput_lines
|
107
107
|
min_lines = (ENV["XING_TMUX_MIN_LINES"] || MINIMUM_WINDOW_LINES).to_i
|
108
108
|
min_lines = [1, lines / min_lines].max
|
109
|
-
if
|
109
|
+
if layout == "tiled"
|
110
110
|
min_lines * 2
|
111
111
|
else
|
112
112
|
min_lines
|
113
113
|
end
|
114
114
|
end
|
115
115
|
|
116
|
+
def layout
|
117
|
+
@layout ||= calculate_layout
|
118
|
+
end
|
119
|
+
|
116
120
|
def calculate_layout
|
117
121
|
min_cols = (ENV["XING_TMUX_MIN_COLS"] || MINIMUM_WINDOW_COLUMNS).to_i
|
118
122
|
cols = tput_cols
|
@@ -142,7 +146,7 @@ module Xing
|
|
142
146
|
end
|
143
147
|
|
144
148
|
def open_additional_window(name, task)
|
145
|
-
tmux "select-layout -t '#@window_name' #{
|
149
|
+
tmux "select-layout -t '#@window_name' #{layout}"
|
146
150
|
@window_count = @window_count + 1
|
147
151
|
@window_name = "Dev Servers #{@window_count}"
|
148
152
|
tmux "new-window -d -n '#@window_name' '#{rake_command(task)}' \\; set-window-option remain-on-exit on"
|
@@ -162,7 +166,7 @@ module Xing
|
|
162
166
|
end
|
163
167
|
|
164
168
|
def wait_all
|
165
|
-
tmux "select-layout -t '#@window_name' #{
|
169
|
+
tmux "select-layout -t '#@window_name' #{layout}"
|
166
170
|
super
|
167
171
|
end
|
168
172
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xing-root
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Judson Lester
|
@@ -97,7 +97,7 @@ rdoc_options:
|
|
97
97
|
- "--main"
|
98
98
|
- doc/README
|
99
99
|
- "--title"
|
100
|
-
- xing-root-0.0.
|
100
|
+
- xing-root-0.0.2 Documentation
|
101
101
|
require_paths:
|
102
102
|
- lib/
|
103
103
|
required_ruby_version: !ruby/object:Gem::Requirement
|