teamocil 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.mkd CHANGED
@@ -1,8 +1,8 @@
1
- # Introduction
1
+ ## Introduction
2
2
 
3
- Teamocil is a tool used to automatically create windows and splits in `tmux` with Ruby and YAML. Like [tmuxinator](https://github.com/aziz/tmuxinator), but with splits, not just windows.
3
+ Teamocil is a tool used to automatically create sessions, windows and splits in `tmux` with Ruby and YAML. Like [tmuxinator](https://github.com/aziz/tmuxinator), but with splits, not just windows.
4
4
 
5
- # Usage
5
+ ## Usage
6
6
 
7
7
  $ gem install teamocil
8
8
  $ mkdir ~/.teamocil
@@ -10,22 +10,29 @@ Teamocil is a tool used to automatically create windows and splits in `tmux` wit
10
10
  $ tmux
11
11
  $ teamocil sample
12
12
 
13
- # Layout example
13
+ ## Options
14
14
 
15
- # ~/.teamocil/sample.yml
15
+ * `--here` opens the session from the current window, it doesn’t create an empty first window.
16
+ * `--layout` takes a custom file path to a YAML layout file.
17
+
18
+ ## Layout example
16
19
 
17
- windows:
18
- - name: sample-window
19
- splits:
20
- - cmd: cd ~/Code/sample/www
21
- - cmd:
22
- - cd ~/Code/sample/www
23
- - rails s
24
- width: 50
25
- - cmd: memcached -p 11211 -vv
26
- height: 25
20
+ # ~/.teamocil/sample.yml
27
21
 
28
- will create a new window named `sample-window` with a layout like this:
22
+ session:
23
+ name: sample-session
24
+ windows:
25
+ - name: sample-window
26
+ splits:
27
+ - cmd: cd ~/Code/sample/www
28
+ - cmd:
29
+ - cd ~/Code/sample/www
30
+ - rails s
31
+ width: 50
32
+ - cmd: memcached -p 11211 -vv
33
+ height: 25
34
+
35
+ Running `$ teamocil sample` will rename the session to `sample-session` and create a new window named `sample-window` with a layout like this:
29
36
 
30
37
  .------------------.------------------.
31
38
  | (0) | (1) |
@@ -38,3 +45,7 @@ will create a new window named `sample-window` with a layout like this:
38
45
  | | (2) |
39
46
  | | |
40
47
  '------------------'------------------'
48
+
49
+ ## Contributors
50
+
51
+ * Samuel Garneau ([garno](https://github.com/garno))
@@ -16,7 +16,14 @@ module Teamocil
16
16
  def generate_commands # {{{
17
17
  output = []
18
18
 
19
- @layout["windows"].each_with_index do |window, window_index|
19
+ if @layout["session"].nil?
20
+ windows = @layout["windows"]
21
+ else
22
+ output << "tmux rename-session #{@layout["session"]["name"]}"
23
+ windows = @layout["session"]["windows"]
24
+ end
25
+
26
+ windows.each_with_index do |window, window_index|
20
27
 
21
28
  if options.include?(:here) and window_index == 0
22
29
  output << "tmux rename-window #{window["name"]}"
data/lib/teamocil.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Teamocil
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.6'
3
3
  autoload :Layout, "teamocil/layout"
4
4
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teamocil
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 5
10
- version: 0.1.5
9
+ - 6
10
+ version: 0.1.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - "R\xC3\xA9mi Pr\xC3\xA9vost"
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-24 00:00:00 -05:00
18
+ date: 2011-07-19 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -63,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
63
63
  requirements: []
64
64
 
65
65
  rubyforge_project:
66
- rubygems_version: 1.5.2
66
+ rubygems_version: 1.3.9.2
67
67
  signing_key:
68
68
  specification_version: 3
69
69
  summary: Easy window and split layouts for tmux