rumai 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (304) hide show
  1. data/LICENSE +13 -23
  2. data/Rakefile +8 -58
  3. data/bin/rumai +21 -22
  4. data/doc/api/IO.html +53 -0
  5. data/doc/api/Integer.html +102 -0
  6. data/doc/api/Object.html +23 -0
  7. data/doc/api/Rumai.html +1218 -0
  8. data/doc/api/Rumai/Area.html +1088 -0
  9. data/doc/api/Rumai/Chain.html +230 -0
  10. data/doc/api/Rumai/Client.html +1264 -0
  11. data/doc/api/Rumai/ClientContainer.html +227 -0
  12. data/doc/api/Rumai/ExportInstMethods.html +115 -0
  13. data/doc/api/Rumai/IXP.html +23 -0
  14. data/doc/api/Rumai/IXP/Agent.html +1222 -0
  15. data/doc/api/Rumai/IXP/Agent/FidStream.html +602 -0
  16. data/doc/api/Rumai/IXP/Agent/RangedPool.html +263 -0
  17. data/doc/api/Rumai/IXP/Error.html +32 -0
  18. data/doc/api/Rumai/IXP/Fcall.html +398 -0
  19. data/doc/api/Rumai/IXP/Qid.html +99 -0
  20. data/doc/api/Rumai/IXP/Rattach.html +71 -0
  21. data/doc/api/Rumai/IXP/Rauth.html +71 -0
  22. data/doc/api/Rumai/IXP/Rclunk.html +71 -0
  23. data/doc/api/Rumai/IXP/Rcreate.html +71 -0
  24. data/doc/api/Rumai/IXP/Rerror.html +71 -0
  25. data/doc/api/Rumai/IXP/Rflush.html +71 -0
  26. data/doc/api/Rumai/IXP/Ropen.html +71 -0
  27. data/doc/api/Rumai/IXP/Rread.html +71 -0
  28. data/doc/api/Rumai/IXP/Rremove.html +71 -0
  29. data/doc/api/Rumai/IXP/Rstat.html +71 -0
  30. data/doc/api/Rumai/IXP/Rversion.html +71 -0
  31. data/doc/api/Rumai/IXP/Rwalk.html +71 -0
  32. data/doc/api/Rumai/IXP/Rwrite.html +71 -0
  33. data/doc/api/Rumai/IXP/Rwstat.html +71 -0
  34. data/doc/api/Rumai/IXP/Stat.html +188 -0
  35. data/doc/api/Rumai/IXP/Stream.html +112 -0
  36. data/doc/api/Rumai/IXP/Struct.html +348 -0
  37. data/doc/api/Rumai/IXP/Struct/ClassField.html +177 -0
  38. data/doc/api/Rumai/IXP/Struct/Field.html +549 -0
  39. data/doc/api/Rumai/IXP/Struct/Field/CounteeField.html +175 -0
  40. data/doc/api/Rumai/IXP/Struct/Field/CounterField.html +95 -0
  41. data/doc/api/Rumai/IXP/Struct/Integer8Field.html +181 -0
  42. data/doc/api/Rumai/IXP/Struct/StringField.html +128 -0
  43. data/doc/api/Rumai/IXP/Tattach.html +71 -0
  44. data/doc/api/Rumai/IXP/Tauth.html +71 -0
  45. data/doc/api/Rumai/IXP/Tclunk.html +71 -0
  46. data/doc/api/Rumai/IXP/Tcreate.html +71 -0
  47. data/doc/api/Rumai/IXP/Terror.html +156 -0
  48. data/doc/api/Rumai/IXP/Tflush.html +71 -0
  49. data/doc/api/Rumai/IXP/Topen.html +113 -0
  50. data/doc/api/Rumai/IXP/Tread.html +71 -0
  51. data/doc/api/Rumai/IXP/Tremove.html +71 -0
  52. data/doc/api/Rumai/IXP/Tstat.html +71 -0
  53. data/doc/api/Rumai/IXP/Tversion.html +83 -0
  54. data/doc/api/Rumai/IXP/Twalk.html +71 -0
  55. data/doc/api/Rumai/IXP/Twrite.html +71 -0
  56. data/doc/api/Rumai/IXP/Twstat.html +71 -0
  57. data/doc/api/Rumai/Node.html +1139 -0
  58. data/doc/api/Rumai/View.html +1280 -0
  59. data/doc/api/Rumai/WidgetImpl.html +196 -0
  60. data/doc/api/Rumai/WidgetNode.html +184 -0
  61. data/doc/api/String.html +180 -0
  62. data/doc/api/StringIO.html +53 -0
  63. data/doc/api/Time.html +175 -0
  64. data/doc/api/all-methods.html +1436 -0
  65. data/doc/api/all-namespaces.html +140 -0
  66. data/doc/api/app.js +18 -0
  67. data/doc/api/index.html +16 -22
  68. data/doc/api/jquery.js +11 -0
  69. data/doc/api/readme.html +35 -0
  70. data/doc/api/style.css +68 -0
  71. data/doc/api/syntax_highlight.css +21 -0
  72. data/doc/history.erb +17 -0
  73. data/doc/index.erb +13 -0
  74. data/doc/index.xhtml +1235 -0
  75. data/doc/intro.erb +86 -0
  76. data/doc/setup.erb +55 -0
  77. data/doc/theory.erb +3 -0
  78. data/doc/usage.erb +285 -0
  79. data/lib/rumai.rb +10 -7
  80. data/lib/rumai/fs.rb +13 -15
  81. data/lib/rumai/ixp.rb +2 -7
  82. data/lib/rumai/ixp/message.rb +0 -3
  83. data/lib/rumai/ixp/transport.rb +1 -4
  84. data/lib/rumai/wm.rb +6 -6
  85. data/test/rumai/ixp/message.rb +249 -0
  86. metadata +104 -263
  87. data/README +0 -1
  88. data/doc/api/classes/IO.html +0 -120
  89. data/doc/api/classes/Integer.html +0 -142
  90. data/doc/api/classes/Integer.src/M000002.html +0 -18
  91. data/doc/api/classes/Object.html +0 -113
  92. data/doc/api/classes/Rumai.html +0 -530
  93. data/doc/api/classes/Rumai.src/M000007.html +0 -18
  94. data/doc/api/classes/Rumai.src/M000008.html +0 -18
  95. data/doc/api/classes/Rumai.src/M000009.html +0 -18
  96. data/doc/api/classes/Rumai.src/M000010.html +0 -18
  97. data/doc/api/classes/Rumai.src/M000011.html +0 -18
  98. data/doc/api/classes/Rumai.src/M000012.html +0 -18
  99. data/doc/api/classes/Rumai.src/M000013.html +0 -18
  100. data/doc/api/classes/Rumai.src/M000014.html +0 -20
  101. data/doc/api/classes/Rumai.src/M000015.html +0 -18
  102. data/doc/api/classes/Rumai.src/M000016.html +0 -18
  103. data/doc/api/classes/Rumai.src/M000017.html +0 -18
  104. data/doc/api/classes/Rumai.src/M000018.html +0 -18
  105. data/doc/api/classes/Rumai.src/M000019.html +0 -18
  106. data/doc/api/classes/Rumai.src/M000020.html +0 -18
  107. data/doc/api/classes/Rumai.src/M000021.html +0 -18
  108. data/doc/api/classes/Rumai.src/M000022.html +0 -18
  109. data/doc/api/classes/Rumai.src/M000023.html +0 -18
  110. data/doc/api/classes/Rumai.src/M000024.html +0 -18
  111. data/doc/api/classes/Rumai.src/M000025.html +0 -18
  112. data/doc/api/classes/Rumai.src/M000026.html +0 -18
  113. data/doc/api/classes/Rumai/Area.html +0 -461
  114. data/doc/api/classes/Rumai/Area.src/M000079.html +0 -19
  115. data/doc/api/classes/Rumai/Area.src/M000080.html +0 -18
  116. data/doc/api/classes/Rumai/Area.src/M000081.html +0 -18
  117. data/doc/api/classes/Rumai/Area.src/M000082.html +0 -18
  118. data/doc/api/classes/Rumai/Area.src/M000083.html +0 -18
  119. data/doc/api/classes/Rumai/Area.src/M000084.html +0 -18
  120. data/doc/api/classes/Rumai/Area.src/M000085.html +0 -18
  121. data/doc/api/classes/Rumai/Area.src/M000086.html +0 -18
  122. data/doc/api/classes/Rumai/Area.src/M000087.html +0 -18
  123. data/doc/api/classes/Rumai/Area.src/M000088.html +0 -18
  124. data/doc/api/classes/Rumai/Area.src/M000089.html +0 -18
  125. data/doc/api/classes/Rumai/Area.src/M000090.html +0 -22
  126. data/doc/api/classes/Rumai/Area.src/M000092.html +0 -23
  127. data/doc/api/classes/Rumai/Area.src/M000093.html +0 -28
  128. data/doc/api/classes/Rumai/Area.src/M000094.html +0 -18
  129. data/doc/api/classes/Rumai/Area.src/M000095.html +0 -31
  130. data/doc/api/classes/Rumai/Chain.html +0 -179
  131. data/doc/api/classes/Rumai/Chain.src/M000076.html +0 -18
  132. data/doc/api/classes/Rumai/Chain.src/M000077.html +0 -18
  133. data/doc/api/classes/Rumai/Chain.src/M000078.html +0 -18
  134. data/doc/api/classes/Rumai/Client.html +0 -481
  135. data/doc/api/classes/Rumai/Client.src/M000113.html +0 -18
  136. data/doc/api/classes/Rumai/Client.src/M000114.html +0 -18
  137. data/doc/api/classes/Rumai/Client.src/M000115.html +0 -18
  138. data/doc/api/classes/Rumai/Client.src/M000116.html +0 -39
  139. data/doc/api/classes/Rumai/Client.src/M000117.html +0 -19
  140. data/doc/api/classes/Rumai/Client.src/M000118.html +0 -19
  141. data/doc/api/classes/Rumai/Client.src/M000119.html +0 -18
  142. data/doc/api/classes/Rumai/Client.src/M000120.html +0 -18
  143. data/doc/api/classes/Rumai/Client.src/M000121.html +0 -18
  144. data/doc/api/classes/Rumai/Client.src/M000122.html +0 -18
  145. data/doc/api/classes/Rumai/Client.src/M000123.html +0 -19
  146. data/doc/api/classes/Rumai/Client.src/M000124.html +0 -20
  147. data/doc/api/classes/Rumai/Client.src/M000125.html +0 -20
  148. data/doc/api/classes/Rumai/Client.src/M000126.html +0 -22
  149. data/doc/api/classes/Rumai/Client.src/M000127.html +0 -18
  150. data/doc/api/classes/Rumai/Client.src/M000128.html +0 -20
  151. data/doc/api/classes/Rumai/Client.src/M000129.html +0 -18
  152. data/doc/api/classes/Rumai/Client.src/M000130.html +0 -22
  153. data/doc/api/classes/Rumai/ClientContainer.html +0 -180
  154. data/doc/api/classes/Rumai/ClientContainer.src/M000027.html +0 -18
  155. data/doc/api/classes/Rumai/ClientContainer.src/M000028.html +0 -18
  156. data/doc/api/classes/Rumai/ClientContainer.src/M000029.html +0 -18
  157. data/doc/api/classes/Rumai/ExportInstMethods.html +0 -119
  158. data/doc/api/classes/Rumai/IXP.html +0 -149
  159. data/doc/api/classes/Rumai/IXP/Agent.html +0 -447
  160. data/doc/api/classes/Rumai/IXP/Agent.src/M000044.html +0 -53
  161. data/doc/api/classes/Rumai/IXP/Agent.src/M000045.html +0 -36
  162. data/doc/api/classes/Rumai/IXP/Agent.src/M000046.html +0 -39
  163. data/doc/api/classes/Rumai/IXP/Agent.src/M000047.html +0 -20
  164. data/doc/api/classes/Rumai/IXP/Agent.src/M000048.html +0 -22
  165. data/doc/api/classes/Rumai/IXP/Agent.src/M000049.html +0 -20
  166. data/doc/api/classes/Rumai/IXP/Agent.src/M000050.html +0 -33
  167. data/doc/api/classes/Rumai/IXP/Agent.src/M000051.html +0 -19
  168. data/doc/api/classes/Rumai/IXP/Agent.src/M000052.html +0 -18
  169. data/doc/api/classes/Rumai/IXP/Agent.src/M000053.html +0 -21
  170. data/doc/api/classes/Rumai/IXP/Agent.src/M000054.html +0 -20
  171. data/doc/api/classes/Rumai/IXP/Agent.src/M000055.html +0 -20
  172. data/doc/api/classes/Rumai/IXP/Agent.src/M000056.html +0 -22
  173. data/doc/api/classes/Rumai/IXP/Agent.src/M000057.html +0 -23
  174. data/doc/api/classes/Rumai/IXP/Agent.src/M000058.html +0 -19
  175. data/doc/api/classes/Rumai/IXP/Agent/FidStream.html +0 -312
  176. data/doc/api/classes/Rumai/IXP/Agent/FidStream.src/M000060.html +0 -23
  177. data/doc/api/classes/Rumai/IXP/Agent/FidStream.src/M000061.html +0 -19
  178. data/doc/api/classes/Rumai/IXP/Agent/FidStream.src/M000062.html +0 -22
  179. data/doc/api/classes/Rumai/IXP/Agent/FidStream.src/M000063.html +0 -18
  180. data/doc/api/classes/Rumai/IXP/Agent/FidStream.src/M000064.html +0 -45
  181. data/doc/api/classes/Rumai/IXP/Agent/FidStream.src/M000065.html +0 -36
  182. data/doc/api/classes/Rumai/IXP/Agent/MODES.html +0 -130
  183. data/doc/api/classes/Rumai/IXP/Agent/MODES.src/M000059.html +0 -22
  184. data/doc/api/classes/Rumai/IXP/Agent/RangedPool.html +0 -203
  185. data/doc/api/classes/Rumai/IXP/Agent/RangedPool.src/M000067.html +0 -22
  186. data/doc/api/classes/Rumai/IXP/Agent/RangedPool.src/M000068.html +0 -36
  187. data/doc/api/classes/Rumai/IXP/Agent/RangedPool.src/M000069.html +0 -18
  188. data/doc/api/classes/Rumai/IXP/Error.html +0 -117
  189. data/doc/api/classes/Rumai/IXP/Fcall.html +0 -261
  190. data/doc/api/classes/Rumai/IXP/Fcall.src/M000070.html +0 -20
  191. data/doc/api/classes/Rumai/IXP/Fcall.src/M000071.html +0 -25
  192. data/doc/api/classes/Rumai/IXP/Fcall.src/M000072.html +0 -18
  193. data/doc/api/classes/Rumai/IXP/Fcall.src/M000073.html +0 -18
  194. data/doc/api/classes/Rumai/IXP/Qid.html +0 -184
  195. data/doc/api/classes/Rumai/IXP/Rattach.html +0 -119
  196. data/doc/api/classes/Rumai/IXP/Rauth.html +0 -119
  197. data/doc/api/classes/Rumai/IXP/Rclunk.html +0 -119
  198. data/doc/api/classes/Rumai/IXP/Rcreate.html +0 -119
  199. data/doc/api/classes/Rumai/IXP/Rerror.html +0 -119
  200. data/doc/api/classes/Rumai/IXP/Rflush.html +0 -119
  201. data/doc/api/classes/Rumai/IXP/Ropen.html +0 -119
  202. data/doc/api/classes/Rumai/IXP/Rread.html +0 -119
  203. data/doc/api/classes/Rumai/IXP/Rremove.html +0 -119
  204. data/doc/api/classes/Rumai/IXP/Rstat.html +0 -119
  205. data/doc/api/classes/Rumai/IXP/Rversion.html +0 -119
  206. data/doc/api/classes/Rumai/IXP/Rwalk.html +0 -119
  207. data/doc/api/classes/Rumai/IXP/Rwrite.html +0 -119
  208. data/doc/api/classes/Rumai/IXP/Rwstat.html +0 -119
  209. data/doc/api/classes/Rumai/IXP/Stat.html +0 -248
  210. data/doc/api/classes/Rumai/IXP/Stat.src/M000075.html +0 -18
  211. data/doc/api/classes/Rumai/IXP/Stream.html +0 -158
  212. data/doc/api/classes/Rumai/IXP/Stream.src/M000043.html +0 -18
  213. data/doc/api/classes/Rumai/IXP/Struct.html +0 -221
  214. data/doc/api/classes/Rumai/IXP/Struct.src/M000030.html +0 -19
  215. data/doc/api/classes/Rumai/IXP/Struct.src/M000031.html +0 -18
  216. data/doc/api/classes/Rumai/IXP/Struct.src/M000032.html +0 -20
  217. data/doc/api/classes/Rumai/IXP/Struct.src/M000033.html +0 -57
  218. data/doc/api/classes/Rumai/IXP/Struct/Field.html +0 -296
  219. data/doc/api/classes/Rumai/IXP/Struct/Field.src/M000034.html +0 -21
  220. data/doc/api/classes/Rumai/IXP/Struct/Field.src/M000035.html +0 -21
  221. data/doc/api/classes/Rumai/IXP/Struct/Field.src/M000036.html +0 -20
  222. data/doc/api/classes/Rumai/IXP/Struct/Field.src/M000037.html +0 -29
  223. data/doc/api/classes/Rumai/IXP/Struct/Field.src/M000038.html +0 -18
  224. data/doc/api/classes/Rumai/IXP/Struct/Field.src/M000039.html +0 -18
  225. data/doc/api/classes/Rumai/IXP/Struct/Field/CounteeField.html +0 -152
  226. data/doc/api/classes/Rumai/IXP/Struct/Field/CounteeField.src/M000041.html +0 -24
  227. data/doc/api/classes/Rumai/IXP/Struct/Field/CounteeField.src/M000042.html +0 -25
  228. data/doc/api/classes/Rumai/IXP/Struct/Field/CounterField.html +0 -137
  229. data/doc/api/classes/Rumai/IXP/Struct/Field/CounterField.src/M000040.html +0 -18
  230. data/doc/api/classes/Rumai/IXP/Tattach.html +0 -120
  231. data/doc/api/classes/Rumai/IXP/Tauth.html +0 -119
  232. data/doc/api/classes/Rumai/IXP/Tclunk.html +0 -119
  233. data/doc/api/classes/Rumai/IXP/Tcreate.html +0 -120
  234. data/doc/api/classes/Rumai/IXP/Terror.html +0 -145
  235. data/doc/api/classes/Rumai/IXP/Terror.src/M000074.html +0 -18
  236. data/doc/api/classes/Rumai/IXP/Tflush.html +0 -119
  237. data/doc/api/classes/Rumai/IXP/Topen.html +0 -193
  238. data/doc/api/classes/Rumai/IXP/Tread.html +0 -119
  239. data/doc/api/classes/Rumai/IXP/Tremove.html +0 -119
  240. data/doc/api/classes/Rumai/IXP/Tstat.html +0 -119
  241. data/doc/api/classes/Rumai/IXP/Tversion.html +0 -137
  242. data/doc/api/classes/Rumai/IXP/Twalk.html +0 -120
  243. data/doc/api/classes/Rumai/IXP/Twrite.html +0 -120
  244. data/doc/api/classes/Rumai/IXP/Twstat.html +0 -119
  245. data/doc/api/classes/Rumai/Node.html +0 -461
  246. data/doc/api/classes/Rumai/Node.src/M000096.html +0 -18
  247. data/doc/api/classes/Rumai/Node.src/M000097.html +0 -18
  248. data/doc/api/classes/Rumai/Node.src/M000098.html +0 -22
  249. data/doc/api/classes/Rumai/Node.src/M000099.html +0 -18
  250. data/doc/api/classes/Rumai/Node.src/M000100.html +0 -18
  251. data/doc/api/classes/Rumai/Node.src/M000101.html +0 -18
  252. data/doc/api/classes/Rumai/Node.src/M000102.html +0 -18
  253. data/doc/api/classes/Rumai/Node.src/M000103.html +0 -22
  254. data/doc/api/classes/Rumai/Node.src/M000104.html +0 -18
  255. data/doc/api/classes/Rumai/Node.src/M000105.html +0 -18
  256. data/doc/api/classes/Rumai/Node.src/M000106.html +0 -18
  257. data/doc/api/classes/Rumai/Node.src/M000107.html +0 -18
  258. data/doc/api/classes/Rumai/Node.src/M000108.html +0 -18
  259. data/doc/api/classes/Rumai/Node.src/M000109.html +0 -18
  260. data/doc/api/classes/Rumai/Node.src/M000110.html +0 -18
  261. data/doc/api/classes/Rumai/Node.src/M000111.html +0 -20
  262. data/doc/api/classes/Rumai/Node.src/M000112.html +0 -27
  263. data/doc/api/classes/Rumai/View.html +0 -436
  264. data/doc/api/classes/Rumai/View.src/M000131.html +0 -18
  265. data/doc/api/classes/Rumai/View.src/M000132.html +0 -18
  266. data/doc/api/classes/Rumai/View.src/M000133.html +0 -18
  267. data/doc/api/classes/Rumai/View.src/M000134.html +0 -18
  268. data/doc/api/classes/Rumai/View.src/M000135.html +0 -18
  269. data/doc/api/classes/Rumai/View.src/M000136.html +0 -18
  270. data/doc/api/classes/Rumai/View.src/M000137.html +0 -18
  271. data/doc/api/classes/Rumai/View.src/M000138.html +0 -28
  272. data/doc/api/classes/Rumai/View.src/M000139.html +0 -18
  273. data/doc/api/classes/Rumai/View.src/M000140.html +0 -18
  274. data/doc/api/classes/Rumai/View.src/M000141.html +0 -18
  275. data/doc/api/classes/Rumai/View.src/M000142.html +0 -18
  276. data/doc/api/classes/Rumai/View.src/M000143.html +0 -29
  277. data/doc/api/classes/Rumai/View.src/M000144.html +0 -20
  278. data/doc/api/classes/Rumai/View.src/M000145.html +0 -33
  279. data/doc/api/classes/Rumai/View.src/M000146.html +0 -50
  280. data/doc/api/classes/String.html +0 -169
  281. data/doc/api/classes/String.src/M000005.html +0 -18
  282. data/doc/api/classes/String.src/M000006.html +0 -18
  283. data/doc/api/classes/StringIO.html +0 -120
  284. data/doc/api/classes/Time.html +0 -163
  285. data/doc/api/classes/Time.src/M000003.html +0 -18
  286. data/doc/api/classes/Time.src/M000004.html +0 -18
  287. data/doc/api/created.rid +0 -1
  288. data/doc/api/files/lib/rumai/fs_rb.html +0 -115
  289. data/doc/api/files/lib/rumai/ixp/message_rb.html +0 -120
  290. data/doc/api/files/lib/rumai/ixp/message_spec_rb.html +0 -175
  291. data/doc/api/files/lib/rumai/ixp/message_spec_rb.src/M000001.html +0 -37
  292. data/doc/api/files/lib/rumai/ixp/transport_rb.html +0 -115
  293. data/doc/api/files/lib/rumai/ixp_rb.html +0 -116
  294. data/doc/api/files/lib/rumai/nfo_rb.html +0 -107
  295. data/doc/api/files/lib/rumai/wm_rb.html +0 -115
  296. data/doc/api/files/lib/rumai_rb.html +0 -115
  297. data/doc/api/fr_class_index.html +0 -82
  298. data/doc/api/fr_file_index.html +0 -34
  299. data/doc/api/fr_method_index.html +0 -172
  300. data/doc/api/rdoc-style.css +0 -208
  301. data/doc/guide.erb +0 -390
  302. data/doc/guide.html +0 -2043
  303. data/lib/rumai/ixp/message_spec.rb +0 -247
  304. data/lib/rumai/nfo.rb +0 -24
data/doc/intro.erb ADDED
@@ -0,0 +1,86 @@
1
+ <% chapter "Introduction" do %>
2
+ <% project_summary do %>
3
+ **<%= $project %>** is a [Ruby](<%= ruby_url %>) interface to the [wmii](<%= wmii_url %>) window manager.
4
+ <% end %>
5
+
6
+ **<%= $project %>** is exciting because:
7
+ * It excels at *dynamic arrangement* of clients, columns, views, and tags.
8
+ * It provides an <%= xref 'shell', 'interactive shell' %> for live entertainment.
9
+ * It contains a *pure Ruby client* for the [9P2000 protocol](<%= p9p_url %>) on which wmii's [IXP file-system interface](<%= wmii_ixp_url %>) is built.
10
+
11
+ These features distinguish **<%= $project %>** from the competition:
12
+ * [ruby-wmii](http://eigenclass.org/hiki.rb?wmii+ruby)
13
+ * [Rii](http://)
14
+ * [Ruby-IXP](http://)
15
+
16
+ <% paragraph "Etymology" do %>
17
+ The word "wmii" is incredibly difficult to pronounce because it is an abbreviation, not an acronym. If we were to treat it as an acronym, the closest pronounciation would be, in my mind, something like "vim-eye".
18
+
19
+ Since this is a Ruby library, I added a "roo" and worked it through:
20
+
21
+ vim-eye
22
+ roo-vim-eye
23
+ roovm-eye
24
+ roo-mai
25
+
26
+ And thus we get "Rumai".
27
+ <% end %>
28
+
29
+ <% section "Logistics" do %>
30
+ * <%= xref "History", "Release notes" %> --- history of project releases.
31
+ * [Source code](http://github.com/sunaku/<%= $program %>) --- obtain via [Git](http://git.or.cz) or browse online.
32
+ * [API reference](api/index.html) --- documentation for source code.
33
+
34
+ To get help or provide feedback, simply
35
+ <%= xref "License", "contact the author(s)" %>.
36
+
37
+ <% paragraph "Version numbers" do %>
38
+ **<%= $project %>** releases are numbered in *major.minor.patch*
39
+ form according to the [RubyGems rational versioning
40
+ policy](http://www.rubygems.org/read/chapter/7), which
41
+ can be summarized thus:
42
+
43
+ <table markdown="1">
44
+ <thead>
45
+ <tr>
46
+ <td rowspan="2">What increased in the version number?</td>
47
+ <td colspan="3">The increase indicates that the release:</td>
48
+ </tr>
49
+ <tr>
50
+ <th>Is backward compatible?</th>
51
+ <th>Has new features?</th>
52
+ <th>Has bug fixes?</th>
53
+ </tr>
54
+ </thead>
55
+ <tbody>
56
+ <tr>
57
+ <th>major</th>
58
+ <td style="background-color: #FFE4E1;">No</td>
59
+ <td>Yes</td>
60
+ <td>Yes</td>
61
+ </tr>
62
+ <tr>
63
+ <th>minor</th>
64
+ <td>Yes</td>
65
+ <td>Yes</td>
66
+ <td>Yes</td>
67
+ </tr>
68
+ <tr>
69
+ <th>patch</th>
70
+ <td>Yes</td>
71
+ <td style="background-color: #FFE4E1;">No</td>
72
+ <td>Yes</td>
73
+ </tr>
74
+ </tbody>
75
+ </table>
76
+ <% end %>
77
+ <% end %>
78
+
79
+ <% section "License" do %>
80
+ <%# include ../LICENSE #%>
81
+ <% end %>
82
+
83
+ <% section "Credits" do %>
84
+ > TODO: give attribution to your predecessors and contributors
85
+ <% end %>
86
+ <% end %>
data/doc/setup.erb ADDED
@@ -0,0 +1,55 @@
1
+ <% chapter "Setup" do %>
2
+ <% section "Requirements" do %>
3
+ Your system needs the following software to run **<%= $project %>**.
4
+
5
+ | Software | Description | Notes |
6
+ | -------- | ----------- | ----- |
7
+ | [Ruby](http://ruby-lang.org) | Ruby language interpreter | Version 1.8.6 or newer is required. |
8
+ | [RubyGems](http://rubygems.org) | Ruby packaging system | Version 1.3.1 or newer is required. |
9
+ | [wmii](<%= wmii_url %>) | Window manager | Version 3.6 or newer is required. |
10
+ <% end %>
11
+
12
+ <% section "Installation" do %>
13
+ You can install **<%= $project %>** by running this command:
14
+
15
+ gem install <%= $program %>
16
+
17
+ To check whether the installation was sucessful, run this command:
18
+
19
+ <%= $program %> --version
20
+
21
+ If the installation was successful, you will see output like this:
22
+
23
+ <pre><%= verbatim `ruby bin/#{$program} --version` %></pre>
24
+
25
+ If you do not see such output, you may
26
+ <%= xref "License", "ask the author(s)" %> for help.
27
+ <% end %>
28
+
29
+ <% section "Manifest" do %>
30
+ You will see the following items inside **<%= $project %>**'s installation
31
+ directory, whose path you can determine by running this command:
32
+
33
+ <%= $program %> --version
34
+
35
+ * <tt>bin/</tt>
36
+
37
+ * <tt><%= $program %></tt> --- the main **<%= $project %>** executable.
38
+
39
+ * <tt>lib/</tt>
40
+
41
+ * <tt><%= $program %>.rb</tt> --- the main **<%= $project %>** library.
42
+
43
+ * <tt><%= $program %>/</tt>
44
+
45
+ * <tt>ixp.rb</tt> - pure Ruby client for the [9P2000 protocol](<%= p9p_url %>)
46
+
47
+ * <tt>doc/</tt>
48
+
49
+ * <tt>api/</tt> --- API reference documentation.
50
+
51
+ * <tt>index.erb</tt> --- source of this user manual.
52
+
53
+ * <tt>LICENSE</tt> --- copyright notice and legal conditions.
54
+ <% end %>
55
+ <% end %>
data/doc/theory.erb ADDED
@@ -0,0 +1,3 @@
1
+ <% chapter "Theory of operation" do %>
2
+ > TODO: explain how your project does what it does
3
+ <% end %>
data/doc/usage.erb ADDED
@@ -0,0 +1,285 @@
1
+ <% chapter "Usage" do %>
2
+ <% section "Concepts" do %>
3
+ If you wish to wield the power of **<%= $project %>** more effectively, you should understand the following basic concepts:
4
+
5
+ * A *client* is any graphical program that is running in your X session. In other words, any *window* in your wmii session is a *client*.
6
+
7
+ * A *tag* is an arbitrary string (a label) that can be associated with one or more clients.
8
+
9
+ * A *view* is a graphical representation of a *tag*. It shows all clients associated with a particular tag.
10
+
11
+ * An *area* is a region inside a *view*. It contains clients.
12
+
13
+ * A *managed area* or *column* is a region where clients cannot overlap each other.
14
+
15
+ * The *floating area* is an area whose clients (1) can overlap each other and (2) _float above_ the managed areas.
16
+ <% end %>
17
+
18
+ <% section "Command-line interface" do %>
19
+ When you run this command:
20
+
21
+ <%= $program %> --help
22
+
23
+ You will see this output:
24
+
25
+ <pre><%= verbatim `ruby bin/#{$program} --help` %></pre>
26
+
27
+ <% paragraph "Interactive shell", "shell" do %>
28
+ When you run this command:
29
+
30
+ <%= $program %>
31
+
32
+ An IRB session will begin, showing you a command prompt like this:
33
+
34
+ irb(Rumai):001:0>
35
+
36
+ The <tt>irb(Rumai)</tt> token in the command prompt indicates that commands will be evaluated _inside_ the `Rumai` module. As a result, you can omit the "Rumai" prefix from your commands if you wish.
37
+
38
+ For example, to get the current client object, you can type `curr_client` instead of having to type `Rumai.curr_client` at the prompt. Both commands achieve the same effect.
39
+
40
+ The next thing to note is that **tab completion** is enabled by default. So you can type part of a command and press the TAB key to see a list of possible completions.
41
+ <% end %>
42
+ <% end %>
43
+
44
+ <% section "Tutorial" do %>
45
+ 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.
46
+
47
+ <%
48
+ open_terms = %q{
49
+ Launch a few terminals so that we have something to work with:
50
+ <code>
51
+ colors = %w[ red green blue black orange brown gray navy gold ]
52
+ colors.each {|c| system "xterm -bg #{c} -title #{c} -e read &" }
53
+ </code>
54
+ }.gsub(/^\s+/, '')
55
+
56
+ close_terms = %q{
57
+ Close the terminals we launched earlier:
58
+ <code>
59
+ terms = curr_view.clients.select {|c| colors.include? c.label.read }
60
+ terms.each {|c| c.kill }
61
+ </code>
62
+ }.gsub(/^\s+/, '')
63
+ %>
64
+
65
+ <% section "Automated client arrangement" do %>
66
+ <%= open_terms %>
67
+
68
+ Arrange all clients in a grid:
69
+ <code>
70
+ curr_view.arrange_in_grid
71
+ </code>
72
+
73
+ Arrange all clients in a diamond shape:
74
+ <code>
75
+ curr_view.arrange_in_diamond
76
+ </code>
77
+
78
+ Arrange all clients like LarsWM does:
79
+ <code>
80
+ curr_view.arrange_as_larswm
81
+ </code>
82
+
83
+ <%= close_terms %>
84
+ <% end %>
85
+
86
+ <% section "Multiple client grouping" do %>
87
+ <%= open_terms %>
88
+
89
+ Add the red, green, and blue terminals into the "grouping":
90
+ <code>
91
+ terms = curr_view.clients.select {|c| %w[red green blue].include? c.label.read }
92
+ terms.each {|c| c.group }
93
+ </code>
94
+
95
+ You should now see a new button labelled as "<notextile>@</notextile>" on the left-hand side of wmii's bar, indicating that there is now a new view labelled "<notextile>@</notextile>" in wmii. Let us inspect what clients this mysterious view contains:
96
+ <code>
97
+ v = View.new "@"
98
+ puts v.clients.map {|c| c.label.read }
99
+ </code>
100
+
101
+ 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.
102
+
103
+ 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:
104
+ <code>
105
+ grouping.each {|c| c.send "toggle" }
106
+ </code>
107
+
108
+ Neat! Let us bring them back into the managed area:
109
+ <code>
110
+ grouping.each {|c| c.send "toggle" }
111
+ </code>
112
+
113
+ <%= close_terms %>
114
+
115
+ 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.
116
+
117
+ Another important aspect is that selected clients stay selected until they are unselected. This allows you to continue performing tasks on the selection without having to reselect the same clients after every operation.
118
+ <% end %>
119
+
120
+ <% section "Easy column manipulation" do %>
121
+ <%= open_terms %>
122
+
123
+ You can insert a group of clients to the top, bottom, or after the currently focused client of _any_ column using Array-like methods.
124
+
125
+ Give each client its own column (one client per column):
126
+ <code>
127
+ curr_view.each_column {|c| c.length = 1 }
128
+ </code>
129
+
130
+ Put (at most) three clients in every column:
131
+ <code>
132
+ curr_view.each_column {|c| c.length = 3 }
133
+ </code>
134
+
135
+ Move the red, green, and blue clients into the floating area:
136
+ <code>
137
+ rgb = %w[red green blue]
138
+ terms = curr_view.clients.select {|c| rgb.include? c.label.read }
139
+ curr_view.areas[0].push terms
140
+ </code>
141
+
142
+ Slurp all floating clients into the last column:
143
+ <code>
144
+ list = curr_view.areas
145
+ a, b = list.first, list.last
146
+ b.concat a
147
+ </code>
148
+
149
+ Set the last column's layout to stacking mode:
150
+ <code>
151
+ b.layout = 'stack'
152
+ </code>
153
+
154
+ Move the red, green, and blue clients to the top of the second column:
155
+ <code>
156
+ curr_view.areas[2].unshift terms
157
+ </code>
158
+
159
+ Move the red, green, and blue clients to the bottom of the third column:
160
+ <code>
161
+ curr_view.areas[3].push terms
162
+ </code>
163
+
164
+ <%= close_terms %>
165
+ <% end %>
166
+
167
+ <% section "Easy client manipulation" do %>
168
+ <%= open_terms %>
169
+
170
+ Obtain a reference to the red client:
171
+ <code>
172
+ red = curr_view.clients.find {|c| c.label.read == "red" }
173
+ </code>
174
+
175
+ Show the red client's current tags:
176
+ <code>
177
+ red.tags
178
+ </code>
179
+
180
+ Add the "foo" and "bar" tags to the red client:
181
+ <code>
182
+ red.tag "foo", "bar"
183
+ </code>
184
+
185
+ Remove the "bar" tag from the red client:
186
+ <code>
187
+ red.untag "bar"
188
+ </code>
189
+
190
+ Do complex operations on the red client's tags:
191
+ <code>
192
+ red.with_tags { concat %w[a b c]; push 'z'; delete 'c' }
193
+ </code>
194
+
195
+ Focus the next client after the red client:
196
+ <code>
197
+ red.next.focus ; curr_client == red.next #=> true
198
+ </code>
199
+
200
+ Notice that by focusing a client, we make it the current client.
201
+
202
+ Focus the red client on a different view:
203
+ <code>
204
+ orig = curr_view
205
+ v = red.views.last
206
+ red.focus v
207
+ </code>
208
+
209
+ Return to the original view:
210
+ <code>
211
+ orig.focus
212
+ </code>
213
+
214
+ Send the red client to the last column:
215
+ <code>
216
+ red.send curr_view.areas.last
217
+ </code>
218
+
219
+ <%= close_terms %>
220
+ <% end %>
221
+
222
+ <% section "Traversing the file system" do %>
223
+ Show the root node of wmii's IXP file system:
224
+ <code>
225
+ fs
226
+ </code>
227
+
228
+ Show the names of all files at the root level:
229
+ <code>
230
+ fs.entries
231
+ </code>
232
+
233
+ Show the parent of the root node:
234
+ <code>
235
+ fs.parent
236
+ </code>
237
+
238
+ Show the children of the root node:
239
+ <code>
240
+ fs.children
241
+ </code>
242
+
243
+ Navigate into to the <tt>/lbar/</tt> directory:
244
+ <code>
245
+ n1 = fs.lbar
246
+ n2 = fs['lbar']
247
+ n1 == n2 #=> true
248
+ left_bar = n1
249
+ </code>
250
+
251
+ 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.
252
+
253
+ Create a new temporary button:
254
+ <code>
255
+ b = left_bar.rumai_example # path of new button
256
+ b.exist? #=> false
257
+ b.create
258
+ b.exist? #=> true
259
+ </code>
260
+
261
+ You should now see an empty button on the left-hand side of the wmii bar.
262
+
263
+ Color the button black-on-white and label it as "hello world":
264
+ <code>
265
+ content = "#000000 #ffffff #000000 hello world"
266
+ b.write content
267
+ b.read == content #=> true
268
+ </code>
269
+
270
+ Remove the temporary button:
271
+ <code>
272
+ b.remove
273
+ b.exist? #=> false
274
+ </code>
275
+ <% end %>
276
+
277
+ <% section "Available commands" do %>
278
+ Refer to the `Rumai` module in the [API documentation](api/index.html) for a complete list of commands (method calls, really) and their documentation.
279
+ <% end %>
280
+ <% end %>
281
+
282
+ <% section "Scripting your wmiirc", 'wmiirc' do %>
283
+ One important application of **<%= $project %>** is the support of Ruby-based <tt>wmiirc</tt> configuration files. For a solid example of such application, take a look at [my personal <tt>wmiirc</tt>](http://github.com/sunaku/wmiirc/tree/master).
284
+ <% end %>
285
+ <% end %>
data/lib/rumai.rb CHANGED
@@ -1,9 +1,12 @@
1
- # Rumai: Ruby interface to wmii.
2
- #--
3
- # Copyright 2007 Suraj N. Kurapati
4
- # See the file named LICENSE for details.
1
+ require 'rubygems'
2
+ gem 'inochi', '~> 0'
3
+ require 'inochi'
5
4
 
6
- $:.unshift __FILE__.sub(/.rb$/, '')
5
+ Inochi.init :Rumai,
6
+ :version => '2.0.1',
7
+ :release => '2009-01-25',
8
+ :website => 'http://snk.tuxfamily.org/lib/rumai',
9
+ :tagline => 'Ruby interface to the wmii window manager'
7
10
 
8
- require 'fs'
9
- require 'wm'
11
+ require 'rumai/fs'
12
+ require 'rumai/wm'