teamocil 1.2 → 1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.md +1 -1
- data/README.md +1 -1
- data/lib/teamocil/command/select_layout.rb +2 -2
- data/lib/teamocil/command/send_keys_to_pane.rb +1 -1
- data/lib/teamocil/command/split_window.rb +2 -2
- data/lib/teamocil/tmux/pane.rb +4 -4
- data/lib/teamocil/tmux/window.rb +6 -2
- data/lib/teamocil/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 430c52e4f910460b68c482b05474b0375999be67
|
4
|
+
data.tar.gz: 700961c611c6c392e0a5c1e7687fd7c8293c9e15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c6247841e7654ae24bd3301753f623228d43484bbd8f4a6086528f5b6db77405442c0cc1dca68aedb181a84f7e1e947d51d8ac7e23ef42d7642cc7765f367e1
|
7
|
+
data.tar.gz: a9a655929c336f54b2e7336a448c669947d80f48c861d30b0edd74fd087a85936ea7c9f72a2d913a71549541e43a3deaed4dd23bf2c98697bde7167a90d121ef
|
data/LICENSE.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2011-
|
1
|
+
Copyright (c) 2011-2015 Rémi Prévost
|
2
2
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
4
4
|
|
data/README.md
CHANGED
@@ -243,6 +243,6 @@ folks did:
|
|
243
243
|
|
244
244
|
## License
|
245
245
|
|
246
|
-
Teamocil is © 2011-
|
246
|
+
Teamocil is © 2011-2015 [Rémi Prévost](http://exomel.com) and may be freely
|
247
247
|
distributed under the [MIT license](https://github.com/remiprev/teamocil/blob/master/LICENSE.md).
|
248
248
|
See the `LICENSE.md` file for more information.
|
data/lib/teamocil/tmux/pane.rb
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
module Teamocil
|
2
2
|
module Tmux
|
3
|
-
class Pane < ClosedStruct.new(:index, :root, :commands, :focus, :layout)
|
3
|
+
class Pane < ClosedStruct.new(:index, :root, :commands, :focus, :layout, :name)
|
4
4
|
def as_tmux
|
5
5
|
[].tap do |tmux|
|
6
|
-
tmux << Teamocil::Command::SplitWindow.new(root: root) unless first?
|
6
|
+
tmux << Teamocil::Command::SplitWindow.new(root: root, name: name) unless first?
|
7
7
|
tmux << Teamocil::Command::SendKeysToPane.new(index: internal_index, keys: commands.join('; ')) if commands
|
8
8
|
tmux << Teamocil::Command::SendKeysToPane.new(index: internal_index, keys: 'Enter')
|
9
|
-
tmux << Teamocil::Command::SelectLayout.new(layout: layout) if layout
|
9
|
+
tmux << Teamocil::Command::SelectLayout.new(layout: layout, name: name) if layout
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
13
|
def internal_index
|
14
|
-
index + self.class.pane_base_index
|
14
|
+
"#{name}.#{index + self.class.pane_base_index}"
|
15
15
|
end
|
16
16
|
|
17
17
|
def self.pane_base_index
|
data/lib/teamocil/tmux/window.rb
CHANGED
@@ -15,12 +15,15 @@ module Teamocil
|
|
15
15
|
# Panes need to know their position
|
16
16
|
pane.merge! index: index
|
17
17
|
|
18
|
-
# Panes need know the window root directory
|
18
|
+
# Panes need to know the window root directory
|
19
19
|
pane.merge! root: root
|
20
20
|
|
21
|
-
# Panes need know the window layout
|
21
|
+
# Panes need to know the window layout
|
22
22
|
pane.merge! layout: layout
|
23
23
|
|
24
|
+
# Panes need to know the window name
|
25
|
+
pane.merge! name: name
|
26
|
+
|
24
27
|
Teamocil::Tmux::Pane.new(pane)
|
25
28
|
end
|
26
29
|
end
|
@@ -46,6 +49,7 @@ module Teamocil
|
|
46
49
|
# Set the focus on the right pane or the first one
|
47
50
|
focused_pane = panes.find(&:focus)
|
48
51
|
focused_index = focused_pane ? focused_pane.internal_index : Teamocil::Tmux::Pane.pane_base_index
|
52
|
+
focused_index = "#{name}.#{focused_index}"
|
49
53
|
tmux << Teamocil::Command::SelectPane.new(index: focused_index)
|
50
54
|
end.flatten
|
51
55
|
end
|
data/lib/teamocil/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teamocil
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.3'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rémi Prévost
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
135
|
version: '0'
|
136
136
|
requirements: []
|
137
137
|
rubyforge_project:
|
138
|
-
rubygems_version: 2.
|
138
|
+
rubygems_version: 2.4.5
|
139
139
|
signing_key:
|
140
140
|
specification_version: 4
|
141
141
|
summary: Teamocil is a simple tool used to automatically create windows and panes
|