i2cssh 1.8.1 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/i2cssh.gemspec +1 -1
- data/lib/i2cssh.rb +17 -6
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.9.0
|
data/i2cssh.gemspec
CHANGED
data/lib/i2cssh.rb
CHANGED
@@ -14,6 +14,9 @@ class I2Cssh
|
|
14
14
|
|
15
15
|
@sys_events = Appscript.app.by_name('System Events')
|
16
16
|
@iterm = Appscript.app.by_name(app_name)
|
17
|
+
|
18
|
+
@pane_menu = @sys_events.processes[app_name].menu_bars[1].menu_bar_items["Window"].menus["Window"].menu_items["Select Split Pane"].menus["Select Split Pane"]
|
19
|
+
@shell_menu = @sys_events.processes[app_name].menu_bars[1].menu_bar_items["Shell"].menus["Shell"]
|
17
20
|
@term = @iterm.make(:new => :terminal)
|
18
21
|
|
19
22
|
@profile = i2_options[:profile] || "Default"
|
@@ -52,24 +55,32 @@ class I2Cssh
|
|
52
55
|
end
|
53
56
|
|
54
57
|
def split_session
|
58
|
+
left = @pane_menu.menu_items["Select Pane Left"]
|
59
|
+
right = @pane_menu.menu_items["Select Pane Right"]
|
60
|
+
up = @pane_menu.menu_items["Select Pane Above"]
|
61
|
+
down = @pane_menu.menu_items["Select Pane Below"]
|
62
|
+
|
63
|
+
split_vert = @shell_menu.menu_items["Split Vertically with Current Profile"]
|
64
|
+
split_hori = @shell_menu.menu_items["Split Horizontally with Current Profile"]
|
65
|
+
|
55
66
|
splitmap = {
|
56
|
-
:column => {0 =>
|
57
|
-
:row => {0 =>
|
67
|
+
:column => {0 => split_vert, 1 => left, 2 => split_hori, 3=> right, :x => @columns, :y => @rows},
|
68
|
+
:row => {0 => split_hori, 1=> up, 2 => split_vert, 3=> down, :x => @rows, :y => @columns}
|
58
69
|
}
|
59
70
|
splitconfig = splitmap[@i2_options[:direction]]
|
60
71
|
|
61
72
|
first = true
|
62
73
|
2.upto splitconfig[:x] do
|
63
|
-
|
74
|
+
splitconfig[0].click
|
64
75
|
end
|
65
76
|
2.upto splitconfig[:y] do
|
66
77
|
1.upto splitconfig[:x] do
|
67
|
-
|
78
|
+
splitconfig[1].click
|
68
79
|
first = false
|
69
80
|
end
|
70
81
|
splitconfig[:x].times do |x|
|
71
|
-
|
72
|
-
|
82
|
+
splitconfig[2].click
|
83
|
+
splitconfig[3].click
|
73
84
|
end
|
74
85
|
end
|
75
86
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i2cssh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 51
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 1.
|
8
|
+
- 9
|
9
|
+
- 0
|
10
|
+
version: 1.9.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Wouter de Bie
|