rumai 3.1.0 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. data/bin/rumai +1 -1
  2. data/doc/api/classes/Integer.html +7 -7
  3. data/doc/api/classes/Rumai.html +148 -141
  4. data/doc/api/classes/Rumai/Area.html +135 -130
  5. data/doc/api/classes/Rumai/Chain.html +21 -21
  6. data/doc/api/classes/Rumai/Client.html +188 -189
  7. data/doc/api/classes/Rumai/ClientContainer.html +22 -22
  8. data/doc/api/classes/Rumai/IXP/Agent.html +248 -143
  9. data/doc/api/classes/Rumai/IXP/Agent/FidStream.html +50 -50
  10. data/doc/api/classes/Rumai/IXP/Agent/MODES.html +7 -7
  11. data/doc/api/classes/Rumai/IXP/Agent/RangedPool.html +21 -21
  12. data/doc/api/classes/Rumai/IXP/Fcall.html +33 -33
  13. data/doc/api/classes/Rumai/IXP/Qid.html +1 -1
  14. data/doc/api/classes/Rumai/IXP/Stat.html +8 -8
  15. data/doc/api/classes/Rumai/IXP/Stream.html +6 -6
  16. data/doc/api/classes/Rumai/IXP/Struct.html +34 -38
  17. data/doc/api/classes/Rumai/IXP/Struct/Field.html +42 -42
  18. data/doc/api/classes/Rumai/IXP/Struct/Field/CounteeField.html +14 -14
  19. data/doc/api/classes/Rumai/IXP/Struct/Field/CounterField.html +7 -7
  20. data/doc/api/classes/Rumai/IXP/Terror.html +7 -7
  21. data/doc/api/classes/Rumai/IXP/Topen.html +1 -1
  22. data/doc/api/classes/Rumai/Node.html +114 -110
  23. data/doc/api/classes/Rumai/View.html +184 -136
  24. data/doc/api/classes/String.html +15 -15
  25. data/doc/api/classes/Time.html +14 -14
  26. data/doc/api/created.rid +1 -1
  27. data/doc/api/files/lib/rumai/fs_rb.html +1 -1
  28. data/doc/api/files/lib/rumai/ixp/message_rb.html +1 -1
  29. data/doc/api/files/lib/rumai/ixp/transport_rb.html +1 -1
  30. data/doc/api/files/lib/rumai/wm_rb.html +1 -1
  31. data/doc/api/files/lib/rumai_rb.html +1 -1
  32. data/doc/api/panel/search_index.js +1 -1
  33. data/doc/history.erb +41 -0
  34. data/doc/index.html +1315 -669
  35. data/doc/setup.erb +82 -45
  36. data/doc/usage.erb +96 -132
  37. data/lib/rumai.rb +2 -2
  38. data/lib/rumai/fs.rb +11 -6
  39. data/lib/rumai/ixp/message.rb +31 -17
  40. data/lib/rumai/ixp/transport.rb +82 -36
  41. data/lib/rumai/wm.rb +87 -25
  42. metadata +5 -5
@@ -11,12 +11,37 @@
11
11
 
12
12
  Your system needs the following software to run <%= $project %>.
13
13
 
14
- | Software | Description | Notes |
15
- | -------- | ----------- | ----- |
16
- | [Ruby](http://ruby-lang.org) | Ruby language interpreter | Version 1.8.6 or newer is required. |
17
- | [RubyGems](http://rubygems.org) | Ruby packaging system | Version 1.3.1 or newer is required. |
18
- | [wmii](<%= wmii_url %>) | Window manager | Version 3.6 or newer is required. |
19
-
14
+ %|table
15
+ %|thead
16
+ %|tr
17
+ %|th
18
+ Software
19
+ %|th
20
+ Description
21
+ %|th
22
+ Notes
23
+ %|tbody
24
+ %|tr
25
+ %|td
26
+ [Ruby](http://ruby-lang.org)
27
+ %|td
28
+ Ruby language interpreter
29
+ %|td
30
+ Version 1.8.6, 1.8.7, 1.9.1 have been tested successfully.
31
+ %|tr
32
+ %|td
33
+ [RubyGems](http://rubygems.org)
34
+ %|td
35
+ Ruby packaging system
36
+ %|td
37
+ Version 1.3.5 or newer is required.
38
+ %|tr
39
+ %|td
40
+ [wmii](<%= wmii_url %>)
41
+ %|td
42
+ Window manager
43
+ %|td
44
+ Version 3.6 or newer is required.
20
45
 
21
46
  %|section "Installation"
22
47
 
@@ -30,13 +55,15 @@
30
55
 
31
56
  If the installation was successful, you will see output like this:
32
57
 
33
- <pre><%= verbatim `ruby bin/#{$program} --version` %></pre>
58
+ %|text
59
+ %= verbatim `ruby bin/#{$program} --version`
34
60
 
35
61
  If you do not see such output, you may
36
- <%= xref "License", "ask the author(s)" %> for help.
62
+ %= xref "License", "ask the author(s)"
63
+ for help.
37
64
 
38
65
 
39
- %|section "Manifest"
66
+ %|section "Package contents"
40
67
 
41
68
  You will see the following items inside <%= $project %>'s installation
42
69
  directory, whose path you can determine by running this command:
@@ -63,45 +90,55 @@
63
90
 
64
91
  * <tt>LICENSE</tt> --- copyright notice and legal conditions.
65
92
 
93
+ * <tt>CREDITS</tt> --- attribution of project contributors.
94
+
66
95
 
67
96
  %|section "Version numbers"
68
97
 
69
98
  <%= $project %> releases are numbered in *major.minor.patch*
70
99
  form according to the [RubyGems rational versioning
71
100
  policy](http://www.rubygems.org/read/chapter/7), which
72
- can be summarized thus:
73
-
74
- <table markdown="1">
75
- <thead>
76
- <tr>
77
- <td rowspan="2">What increased in the version number?</td>
78
- <td colspan="3">The increase indicates that the release:</td>
79
- </tr>
80
- <tr>
81
- <th>Is backward compatible?</th>
82
- <th>Has new features?</th>
83
- <th>Has bug fixes?</th>
84
- </tr>
85
- </thead>
86
- <tbody>
87
- <tr>
88
- <th>major</th>
89
- <td style="background-color: #FFE4E1;">No</td>
90
- <td>Yes</td>
91
- <td>Yes</td>
92
- </tr>
93
- <tr>
94
- <th>minor</th>
95
- <td>Yes</td>
96
- <td>Yes</td>
97
- <td>Yes</td>
98
- </tr>
99
- <tr>
100
- <th>patch</th>
101
- <td>Yes</td>
102
- <td style="background-color: #FFE4E1;">No</td>
103
- <td>Yes</td>
104
- </tr>
105
- </tbody>
106
- </table>
107
-
101
+ can be summarized as follows:
102
+
103
+ %|table
104
+ %|thead
105
+ %|tr
106
+ %|td :rowspan => 2
107
+ What increased in the version number?
108
+ %|td :colspan => 3
109
+ The increase indicates that the release:
110
+ %|tr
111
+ %|th
112
+ Is backward compatible?
113
+ %|th
114
+ Has new features?
115
+ %|th
116
+ Has bug fixes?
117
+ %|tbody
118
+ %|tr
119
+ %|th
120
+ major
121
+ %|td :style => "background-color: #FFE4E1;"
122
+ No
123
+ %|td
124
+ Yes
125
+ %|td
126
+ Yes
127
+ %|tr
128
+ %|th
129
+ minor
130
+ %|td
131
+ Yes
132
+ %|td
133
+ Yes
134
+ %|td
135
+ Yes
136
+ %|tr
137
+ %|th
138
+ patch
139
+ %|td
140
+ Yes
141
+ %|td :style => "background-color: #FFE4E1;"
142
+ No
143
+ %|td
144
+ Yes
@@ -39,7 +39,8 @@
39
39
 
40
40
  You will see this output:
41
41
 
42
- <pre><%= verbatim `ruby bin/#{$program} --help` %></pre>
42
+ %|text
43
+ %= verbatim `ruby bin/#{$program} --help`
43
44
 
44
45
 
45
46
  %|paragraph "Interactive shell", "shell"
@@ -63,85 +64,72 @@
63
64
 
64
65
  Now that you know <%= xref "shell", "how to start the interactive shell" %>, let us walk through a quick demonstration that highlights the main features of <%= $project %>. You can follow along by copying & pasting the presented commands into the interactive shell.
65
66
 
66
- <%
67
- open_terms = %q{
68
- Launch a few terminals so that we have something to work with:
67
+ %|open_terms = lambda do
68
+ Launch a few terminals so that we have something to work with:
69
69
 
70
- <code>
70
+ %|code :ruby
71
71
  colors = %w[ red green blue black orange brown gray navy gold ]
72
72
  colors.each {|c| system "xterm -bg #{c} -title #{c} -e sh -c read &" }
73
- </code>
74
- }.gsub(/^\s+/, '')
75
73
 
76
- close_terms = %q{
77
- Close the terminals we launched earlier:
74
+ %|close_terms = lambda do
75
+ Close the terminals we launched earlier:
78
76
 
79
- <code>
77
+ %|code :ruby
80
78
  terms = curr_view.clients.select {|c| colors.include? c.label.read }
81
79
  terms.each {|c| c.kill }
82
- </code>
83
- }.gsub(/^\s+/, '')
84
- %>
85
80
 
86
81
 
87
82
  %|section "Automated client arrangement"
88
83
 
89
- %= open_terms
84
+ % open_terms.call
90
85
 
91
86
  Arrange all clients in a grid:
92
87
 
93
- <code>
94
- curr_view.arrange_in_grid
95
- </code>
88
+ %|code :ruby
89
+ curr_view.arrange_in_grid
96
90
 
97
91
  Arrange all clients in a diamond shape:
98
92
 
99
- <code>
100
- curr_view.arrange_in_diamond
101
- </code>
93
+ %|code :ruby
94
+ curr_view.arrange_in_diamond
102
95
 
103
96
  Arrange all clients like LarsWM does:
104
97
 
105
- <code>
106
- curr_view.arrange_as_larswm
107
- </code>
98
+ %|code :ruby
99
+ curr_view.arrange_as_larswm
108
100
 
109
- %= close_terms
101
+ % close_terms.call
110
102
 
111
103
 
112
104
  %|section "Multiple client grouping"
113
105
 
114
- %= open_terms
106
+ % open_terms.call
115
107
 
116
108
  Add the red, green, and blue terminals into the "grouping":
117
109
 
118
- <code>
119
- terms = curr_view.clients.select {|c| %w[red green blue].include? c.label.read }
120
- terms.each {|c| c.group }
121
- </code>
110
+ %|code :ruby
111
+ terms = curr_view.clients.select {|c| %w[red green blue].include? c.label.read }
112
+ terms.each {|c| c.group }
122
113
 
123
114
  You should now see a new button labelled as "@" on the left-hand side of wmii's bar, indicating that there is now a new view labelled "@" in wmii. Let us inspect what clients this mysterious view contains:
124
115
 
125
- <code>
126
- v = View.new "@"
127
- puts v.clients.map {|c| c.label.read }
128
- </code>
116
+ %|code :ruby
117
+ v = View.new "@"
118
+ puts v.clients.map {|c| c.label.read }
129
119
 
130
120
  Aha! The mysterious view contains the red, green, and blue clients we recently "grouped". Thus, by adding a client to the "grouping", we are simply tagging the client with the "@" token.
131
121
 
132
122
  Now that we have put some clients into the "grouping", let us move all clients in the grouping to the floating area in the current view:
133
123
 
134
- <code>
135
- grouping.each {|c| c.send "toggle" }
136
- </code>
124
+ %|code :ruby
125
+ grouping.each {|c| c.send "toggle" }
137
126
 
138
127
  Neat! Let us bring them back into the managed area:
139
128
 
140
- <code>
141
- grouping.each {|c| c.send "toggle" }
142
- </code>
129
+ %|code :ruby
130
+ grouping.each {|c| c.send "toggle" }
143
131
 
144
- %= close_terms
132
+ % close_terms.call
145
133
 
146
134
  In summary, you can select multiple clients (by adding them to the "grouping") and perform operations on them. This is useful when you want to do something with a group of clients but do not want to manually focus one, perform the action, focus the next one, and so on.
147
135
 
@@ -150,187 +138,163 @@
150
138
 
151
139
  %|section "Easy column manipulation"
152
140
 
153
- %= open_terms
141
+ % open_terms.call
154
142
 
155
143
  You can insert a group of clients to the top, bottom, or after the currently focused client of _any_ column using Array-like methods.
156
144
 
157
145
  Give each client its own column (one client per column):
158
146
 
159
- <code>
160
- curr_view.each_column {|c| c.length = 1 }
161
- </code>
147
+ %|code :ruby
148
+ curr_view.each_column {|c| c.length = 1 }
162
149
 
163
150
  Put (at most) three clients in every column:
164
151
 
165
- <code>
166
- curr_view.each_column {|c| c.length = 3 }
167
- </code>
152
+ %|code :ruby
153
+ curr_view.each_column {|c| c.length = 3 }
168
154
 
169
155
  Move the red, green, and blue clients into the floating area:
170
156
 
171
- <code>
172
- rgb = %w[red green blue]
173
- terms = curr_view.clients.select {|c| rgb.include? c.label.read }
174
- curr_view.areas[0].push terms
175
- </code>
157
+ %|code :ruby
158
+ rgb = %w[red green blue]
159
+ terms = curr_view.clients.select {|c| rgb.include? c.label.read }
160
+ curr_view.areas[0].push terms
176
161
 
177
162
  Slurp all floating clients into the last column:
178
163
 
179
- <code>
180
- list = curr_view.areas
181
- a, b = list.first, list.last
182
- b.concat a
183
- </code>
164
+ %|code :ruby
165
+ list = curr_view.areas
166
+ a, b = list.first, list.last
167
+ b.concat a
184
168
 
185
169
  Set the last column's layout to stacking mode:
186
170
 
187
- <code>
188
- b.layout = 'stack'
189
- </code>
171
+ %|code :ruby
172
+ b.layout = 'stack'
190
173
 
191
174
  Move the red, green, and blue clients to the top of the second column:
192
175
 
193
- <code>
194
- curr_view.areas[2].unshift terms
195
- </code>
176
+ %|code :ruby
177
+ curr_view.areas[2].unshift terms
196
178
 
197
179
  Move the red, green, and blue clients to the bottom of the third column:
198
180
 
199
- <code>
200
- curr_view.areas[3].push terms
201
- </code>
181
+ %|code :ruby
182
+ curr_view.areas[3].push terms
202
183
 
203
- %= close_terms
184
+ % close_terms.call
204
185
 
205
186
 
206
187
  %|section "Easy client manipulation"
207
188
 
208
- %= open_terms
189
+ % open_terms.call
209
190
 
210
191
  Obtain a reference to the red client:
211
192
 
212
- <code>
213
- red = curr_view.clients.find {|c| c.label.read == "red" }
214
- </code>
193
+ %|code :ruby
194
+ red = curr_view.clients.find {|c| c.label.read == "red" }
215
195
 
216
196
  Show the red client's current tags:
217
197
 
218
- <code>
219
- red.tags
220
- </code>
198
+ %|code :ruby
199
+ red.tags
221
200
 
222
201
  Add the "foo" and "bar" tags to the red client:
223
202
 
224
- <code>
225
- red.tag "foo", "bar"
226
- </code>
203
+ %|code :ruby
204
+ red.tag "foo", "bar"
227
205
 
228
206
  Remove the "bar" tag from the red client:
229
207
 
230
- <code>
231
- red.untag "bar"
232
- </code>
208
+ %|code :ruby
209
+ red.untag "bar"
233
210
 
234
211
  Do complex operations on the red client's tags:
235
212
 
236
- <code>
237
- red.with_tags { concat %w[a b c]; push 'z'; delete 'c' }
238
- </code>
213
+ %|code :ruby
214
+ red.with_tags { concat %w[a b c]; push 'z'; delete 'c' }
239
215
 
240
216
  Focus the next client after the red client:
241
217
 
242
- <code>
243
- red.next.focus
244
- curr_client == red.next #=> true
245
- </code>
218
+ %|code :ruby
219
+ red.next.focus
220
+ curr_client == red.next #=> true
246
221
 
247
222
  Notice that by focusing a client, we make it the current client.
248
223
 
249
224
  Focus the red client on a different view:
250
225
 
251
- <code>
252
- orig = curr_view
253
- v = red.views.last
254
- red.focus v
255
- </code>
226
+ %|code :ruby
227
+ orig = curr_view
228
+ v = red.views.last
229
+ red.focus v
256
230
 
257
231
  Return to the original view:
258
232
 
259
- <code>
260
- orig.focus
261
- </code>
233
+ %|code :ruby
234
+ orig.focus
262
235
 
263
236
  Send the red client to the last column:
264
237
 
265
- <code>
266
- red.send curr_view.areas.last
267
- </code>
238
+ %|code :ruby
239
+ red.send curr_view.areas.last
268
240
 
269
- %= close_terms
241
+ % close_terms.call
270
242
 
271
243
 
272
244
  %|section "Traversing the file system"
273
245
 
274
246
  Show the root node of wmii's IXP file system:
275
247
 
276
- <code>
277
- fs
278
- </code>
248
+ %|code :ruby
249
+ fs
279
250
 
280
251
  Show the names of all files at the root level:
281
252
 
282
- <code>
283
- fs.entries
284
- </code>
253
+ %|code :ruby
254
+ fs.entries
285
255
 
286
256
  Show the parent of the root node:
287
257
 
288
- <code>
289
- fs.parent
290
- </code>
258
+ %|code :ruby
259
+ fs.parent
291
260
 
292
261
  Show the children of the root node:
293
262
 
294
- <code>
295
- fs.children
296
- </code>
263
+ %|code :ruby
264
+ fs.children
297
265
 
298
266
  Navigate into to the <tt>/lbar/</tt> directory:
299
267
 
300
- <code>
301
- n1 = fs.lbar
302
- n2 = fs['lbar']
303
- n1 == n2 #=> true
304
- left_bar = n1
305
- </code>
268
+ %|code :ruby
269
+ n1 = fs.lbar
270
+ n2 = fs['lbar']
271
+ n1 == n2 #=> true
272
+ left_bar = n1
306
273
 
307
274
  Notice that you can traverse the file system hierarchy by simply calling methods on node objects. Alternatively, you can traverse by specifying an arbitrary sub-path (relative path) using the `[]` operator on a node.
308
275
 
309
276
  Create a new temporary button:
310
277
 
311
- <code>
312
- b = left_bar.rumai_example # path of new button
313
- b.exist? #=> false
314
- b.create
315
- b.exist? #=> true
316
- </code>
278
+ %|code :ruby
279
+ b = left_bar.rumai_example # path of new button
280
+ b.exist? #=> false
281
+ b.create
282
+ b.exist? #=> true
317
283
 
318
284
  You should now see an empty button on the left-hand side of the wmii bar.
319
285
 
320
286
  Color the button black-on-white and label it as "hello world":
321
287
 
322
- <code>
323
- content = "#000000 #ffffff #000000 hello world"
324
- b.write content
325
- b.read == content #=> true
326
- </code>
288
+ %|code :ruby
289
+ content = "#000000 #ffffff #000000 hello world"
290
+ b.write content
291
+ b.read == content #=> true
327
292
 
328
293
  Remove the temporary button:
329
294
 
330
- <code>
331
- b.remove
332
- b.exist? #=> false
333
- </code>
295
+ %|code :ruby
296
+ b.remove
297
+ b.exist? #=> false
334
298
 
335
299
 
336
300
  %|section "Available commands"