just-tmux 0.1.6 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/just-tmux.rb +8 -6
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1bdd09e2d7b7194cbffa988e8aebb4c69728d03
|
4
|
+
data.tar.gz: 21d6b02ea8f90bb6fc33814edb64ed977031dc03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ed2909a87e1876cb3f51aed228a9f5ee276cfd81c4a8c98dce9b1baf78590c011ec864026fc7be2352fb0d3cab66a2c30ed84dc041ce2a7c0e5eb94f332b71e
|
7
|
+
data.tar.gz: 0399a3368270a5b3e846ac7ca9448494c53ae2531e234ede3766bc12d290537f901d478318ad1cc53b03f5a1f6b9a979dc11b58831c01ab605731ddc8f346c91
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/just-tmux.rb
CHANGED
@@ -30,15 +30,16 @@ class JustTmux
|
|
30
30
|
session_name = dynarex.summary[:session] || '0'
|
31
31
|
|
32
32
|
h = dynarex.to_h.map do |x|
|
33
|
-
x[:name]
|
34
|
-
x[:dir]
|
33
|
+
x[:name] = shell if x[:name].nil? or x[:name].empty?
|
34
|
+
x[:dir] = default_dir if x[:dir].nil? or x[:dir].empty?
|
35
|
+
x[:sleep] = 0 if x[:sleep].nil? or x[:sleep].empty?
|
35
36
|
x
|
36
37
|
end
|
37
38
|
|
38
39
|
@to_s = new_session(session_name, h[0][:name], shell,
|
39
|
-
"cd #{h[0][:dir]} && " + h[0][:command]) +
|
40
|
-
{|x| new_window(x[:name], shell, "cd #{x[:dir]} && " + \
|
41
|
-
x[:command]) }.join
|
40
|
+
"cd #{h[0][:dir]} && " + h[0][:command]) + wait(h[0][:sleep]) +
|
41
|
+
h[1..-1].map {|x| new_window(x[:name], shell, "cd #{x[:dir]} && " + \
|
42
|
+
x[:command]) + wait(x[:sleep]) }.join
|
42
43
|
|
43
44
|
end
|
44
45
|
|
@@ -53,6 +54,7 @@ class JustTmux
|
|
53
54
|
"tmux new-window -n %s %s\n%s" % [window_name, shell, send_keys(command)]
|
54
55
|
end
|
55
56
|
|
56
|
-
def send_keys(command) "tmux send-keys '%s' Enter\n" % command
|
57
|
+
def send_keys(command) "tmux send-keys '%s' Enter\n" % command end
|
58
|
+
def wait(duration) "sleep %s\n" % duration end
|
57
59
|
|
58
60
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|