i2cssh 1.10.0 → 1.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/i2cssh.gemspec +2 -2
- data/lib/i2cssh.rb +29 -20
- 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: 9ae84134f38887618471a3f0a1f987c529011752
|
4
|
+
data.tar.gz: 72a055afdc9d135cb535004b023f0e0bb9bd82e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25e039871f95ea23c6fe50c7c68ee7c6b83504922be105e938e53d408e0e98ecdafb18cf06cfc9b29b32589cbccbbe1cba97b9419b9cc9a46a0652d9c12bdaa5
|
7
|
+
data.tar.gz: c61cd58abd6b314df8732ae3ab97450e5bfd13ebf0d5623b7c4f27433af02763e2d1e8dab140ec6996ed50556eae609a6fc22e410a9fa7c35dd44e3f7e936bbb
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.11.0
|
data/i2cssh.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "i2cssh"
|
8
|
-
s.version = "1.
|
8
|
+
s.version = "1.11.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Wouter de Bie"]
|
12
|
-
s.date = "2014-02-
|
12
|
+
s.date = "2014-02-23"
|
13
13
|
s.description = "csshX like cluster ssh using iTerm2 panes"
|
14
14
|
s.email = "wouter@evenflow.se"
|
15
15
|
s.executables = ["i2cssh"]
|
data/lib/i2cssh.rb
CHANGED
@@ -25,18 +25,22 @@ class I2Cssh
|
|
25
25
|
session.exec :command => "/bin/bash -l"
|
26
26
|
|
27
27
|
compute_geometry
|
28
|
+
maximize(app_name) if i2_options[:fullscreen]
|
28
29
|
split_session
|
29
|
-
maximize if i2_options[:fullscreen]
|
30
|
-
|
31
30
|
start_ssh
|
32
31
|
enable_broadcast if i2_options[:broadcast]
|
33
32
|
end
|
34
33
|
|
35
34
|
private
|
36
|
-
def maximize
|
37
|
-
|
38
|
-
|
39
|
-
|
35
|
+
def maximize(app_name)
|
36
|
+
begin
|
37
|
+
# OSX >= 10.8 has different behavior for full screen. First try out old behavior.
|
38
|
+
fullscreen_bounds = Appscript.app.by_name('Finder').desktop.window.bounds
|
39
|
+
window = @iterm.windows.get.sort_by{|x| x.id_.get}.last
|
40
|
+
window.bounds.set fullscreen_bounds.get
|
41
|
+
rescue
|
42
|
+
@sys_events.processes[app_name].windows.first.attributes["AXFullScreen"].value.set(true)
|
43
|
+
end
|
40
44
|
end
|
41
45
|
|
42
46
|
def compute_geometry
|
@@ -45,12 +49,17 @@ class I2Cssh
|
|
45
49
|
@columns = @i2_options[:columns]
|
46
50
|
|
47
51
|
if @rows then
|
48
|
-
|
52
|
+
@columns = (count / @rows.to_f).ceil
|
49
53
|
elsif @columns then
|
50
|
-
|
54
|
+
@rows = (count / @columns.to_f).ceil
|
51
55
|
else
|
52
|
-
|
53
|
-
|
56
|
+
@columns = Math.sqrt(count).ceil
|
57
|
+
@rows = (count / @columns.to_f).ceil
|
58
|
+
end
|
59
|
+
# Quick hack: iTerms default window only supports up to 11 rows and 22 columns
|
60
|
+
# If we surpass either one, we resort to full screen.
|
61
|
+
if @rows > 11 or @columns > 22 then
|
62
|
+
@i2_options[:fullscreen] = true
|
54
63
|
end
|
55
64
|
end
|
56
65
|
|
@@ -79,17 +88,17 @@ class I2Cssh
|
|
79
88
|
|
80
89
|
first = true
|
81
90
|
2.upto splitconfig[:x] do
|
82
|
-
|
91
|
+
splitconfig[0].click
|
83
92
|
end
|
84
93
|
2.upto splitconfig[:y] do
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
94
|
+
1.upto splitconfig[:x] do
|
95
|
+
splitconfig[1].click
|
96
|
+
first = false
|
97
|
+
end
|
98
|
+
splitconfig[:x].times do |x|
|
99
|
+
splitconfig[2].click
|
100
|
+
splitconfig[3].click
|
101
|
+
end
|
93
102
|
end
|
94
103
|
end
|
95
104
|
|
@@ -103,7 +112,7 @@ class I2Cssh
|
|
103
112
|
1.upto(@rows*@columns) do |i|
|
104
113
|
server = @servers[i-1]
|
105
114
|
if server then
|
106
|
-
|
115
|
+
send_env = ""
|
107
116
|
|
108
117
|
if @i2_options[:rank] then
|
109
118
|
@ssh_environment['LC_RANK'] = i-1
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i2cssh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wouter de Bie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|