rumai 3.1.0 → 3.2.0
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.
- data/bin/rumai +1 -1
- data/doc/api/classes/Integer.html +7 -7
- data/doc/api/classes/Rumai.html +148 -141
- data/doc/api/classes/Rumai/Area.html +135 -130
- data/doc/api/classes/Rumai/Chain.html +21 -21
- data/doc/api/classes/Rumai/Client.html +188 -189
- data/doc/api/classes/Rumai/ClientContainer.html +22 -22
- data/doc/api/classes/Rumai/IXP/Agent.html +248 -143
- data/doc/api/classes/Rumai/IXP/Agent/FidStream.html +50 -50
- data/doc/api/classes/Rumai/IXP/Agent/MODES.html +7 -7
- data/doc/api/classes/Rumai/IXP/Agent/RangedPool.html +21 -21
- data/doc/api/classes/Rumai/IXP/Fcall.html +33 -33
- data/doc/api/classes/Rumai/IXP/Qid.html +1 -1
- data/doc/api/classes/Rumai/IXP/Stat.html +8 -8
- data/doc/api/classes/Rumai/IXP/Stream.html +6 -6
- data/doc/api/classes/Rumai/IXP/Struct.html +34 -38
- data/doc/api/classes/Rumai/IXP/Struct/Field.html +42 -42
- data/doc/api/classes/Rumai/IXP/Struct/Field/CounteeField.html +14 -14
- data/doc/api/classes/Rumai/IXP/Struct/Field/CounterField.html +7 -7
- data/doc/api/classes/Rumai/IXP/Terror.html +7 -7
- data/doc/api/classes/Rumai/IXP/Topen.html +1 -1
- data/doc/api/classes/Rumai/Node.html +114 -110
- data/doc/api/classes/Rumai/View.html +184 -136
- data/doc/api/classes/String.html +15 -15
- data/doc/api/classes/Time.html +14 -14
- data/doc/api/created.rid +1 -1
- data/doc/api/files/lib/rumai/fs_rb.html +1 -1
- data/doc/api/files/lib/rumai/ixp/message_rb.html +1 -1
- data/doc/api/files/lib/rumai/ixp/transport_rb.html +1 -1
- data/doc/api/files/lib/rumai/wm_rb.html +1 -1
- data/doc/api/files/lib/rumai_rb.html +1 -1
- data/doc/api/panel/search_index.js +1 -1
- data/doc/history.erb +41 -0
- data/doc/index.html +1315 -669
- data/doc/setup.erb +82 -45
- data/doc/usage.erb +96 -132
- data/lib/rumai.rb +2 -2
- data/lib/rumai/fs.rb +11 -6
- data/lib/rumai/ixp/message.rb +31 -17
- data/lib/rumai/ixp/transport.rb +82 -36
- data/lib/rumai/wm.rb +87 -25
- metadata +5 -5
data/doc/setup.erb
CHANGED
@@ -11,12 +11,37 @@
|
|
11
11
|
|
12
12
|
Your system needs the following software to run <%= $project %>.
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
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
|
-
|
58
|
+
%|text
|
59
|
+
%= verbatim `ruby bin/#{$program} --version`
|
34
60
|
|
35
61
|
If you do not see such output, you may
|
36
|
-
|
62
|
+
%= xref "License", "ask the author(s)"
|
63
|
+
for help.
|
37
64
|
|
38
65
|
|
39
|
-
%|section "
|
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
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
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
|
data/doc/usage.erb
CHANGED
@@ -39,7 +39,8 @@
|
|
39
39
|
|
40
40
|
You will see this output:
|
41
41
|
|
42
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
77
|
-
|
74
|
+
%|close_terms = lambda do
|
75
|
+
Close the terminals we launched earlier:
|
78
76
|
|
79
|
-
|
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
|
-
|
84
|
+
% open_terms.call
|
90
85
|
|
91
86
|
Arrange all clients in a grid:
|
92
87
|
|
93
|
-
|
94
|
-
|
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
|
-
|
100
|
-
|
101
|
-
</code>
|
93
|
+
%|code :ruby
|
94
|
+
curr_view.arrange_in_diamond
|
102
95
|
|
103
96
|
Arrange all clients like LarsWM does:
|
104
97
|
|
105
|
-
|
106
|
-
|
107
|
-
</code>
|
98
|
+
%|code :ruby
|
99
|
+
curr_view.arrange_as_larswm
|
108
100
|
|
109
|
-
|
101
|
+
% close_terms.call
|
110
102
|
|
111
103
|
|
112
104
|
%|section "Multiple client grouping"
|
113
105
|
|
114
|
-
|
106
|
+
% open_terms.call
|
115
107
|
|
116
108
|
Add the red, green, and blue terminals into the "grouping":
|
117
109
|
|
118
|
-
|
119
|
-
|
120
|
-
|
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
|
-
|
126
|
-
|
127
|
-
|
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
|
-
|
135
|
-
|
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
|
-
|
141
|
-
|
142
|
-
</code>
|
129
|
+
%|code :ruby
|
130
|
+
grouping.each {|c| c.send "toggle" }
|
143
131
|
|
144
|
-
|
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
|
-
|
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
|
-
|
160
|
-
|
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
|
-
|
166
|
-
|
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
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
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
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
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
|
-
|
188
|
-
|
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
|
-
|
194
|
-
|
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
|
-
|
200
|
-
|
201
|
-
</code>
|
181
|
+
%|code :ruby
|
182
|
+
curr_view.areas[3].push terms
|
202
183
|
|
203
|
-
|
184
|
+
% close_terms.call
|
204
185
|
|
205
186
|
|
206
187
|
%|section "Easy client manipulation"
|
207
188
|
|
208
|
-
|
189
|
+
% open_terms.call
|
209
190
|
|
210
191
|
Obtain a reference to the red client:
|
211
192
|
|
212
|
-
|
213
|
-
|
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
|
-
|
219
|
-
|
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
|
-
|
225
|
-
|
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
|
-
|
231
|
-
|
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
|
-
|
237
|
-
|
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
|
-
|
243
|
-
|
244
|
-
|
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
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
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
|
-
|
260
|
-
|
261
|
-
</code>
|
233
|
+
%|code :ruby
|
234
|
+
orig.focus
|
262
235
|
|
263
236
|
Send the red client to the last column:
|
264
237
|
|
265
|
-
|
266
|
-
|
267
|
-
</code>
|
238
|
+
%|code :ruby
|
239
|
+
red.send curr_view.areas.last
|
268
240
|
|
269
|
-
|
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
|
-
|
277
|
-
|
278
|
-
</code>
|
248
|
+
%|code :ruby
|
249
|
+
fs
|
279
250
|
|
280
251
|
Show the names of all files at the root level:
|
281
252
|
|
282
|
-
|
283
|
-
|
284
|
-
</code>
|
253
|
+
%|code :ruby
|
254
|
+
fs.entries
|
285
255
|
|
286
256
|
Show the parent of the root node:
|
287
257
|
|
288
|
-
|
289
|
-
|
290
|
-
</code>
|
258
|
+
%|code :ruby
|
259
|
+
fs.parent
|
291
260
|
|
292
261
|
Show the children of the root node:
|
293
262
|
|
294
|
-
|
295
|
-
|
296
|
-
</code>
|
263
|
+
%|code :ruby
|
264
|
+
fs.children
|
297
265
|
|
298
266
|
Navigate into to the <tt>/lbar/</tt> directory:
|
299
267
|
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
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
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
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
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
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
|
-
|
331
|
-
|
332
|
-
|
333
|
-
</code>
|
295
|
+
%|code :ruby
|
296
|
+
b.remove
|
297
|
+
b.exist? #=> false
|
334
298
|
|
335
299
|
|
336
300
|
%|section "Available commands"
|