just-tmux 0.1.6 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 13816c0431dbb5dc67e88aade297eb54c9c608b8
4
- data.tar.gz: 09a64d8106ce2c0a17e23e35f972d98c16b34b8e
3
+ metadata.gz: b1bdd09e2d7b7194cbffa988e8aebb4c69728d03
4
+ data.tar.gz: 21d6b02ea8f90bb6fc33814edb64ed977031dc03
5
5
  SHA512:
6
- metadata.gz: cd3abb8142dfb270922be641f927915ea8ac0c426abb6331a9763fd8eb433835d2b3f36800a17a0ebbb511a5bd3ca53d8e86946b1828306df5a2385acebbfa6a
7
- data.tar.gz: 74f0a4ed196e9f3ff2cdbf3464bb2d344f2ae8282a6417a6b0b97775608918f3b9ac3afbeb47780574683377666f1ab3cbee85c655b3574b089c2e6496e225f4
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] = shell if x[:name].empty?
34
- x[:dir] = default_dir if x[:dir].empty?
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]) + h[1..-1].map \
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 end
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
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: just-tmux
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file