Module: Rumai
- Extended by:
- Rumai
- Includes:
- ClientContainer
- Included in:
- Rumai
- Defined in:
- lib/rumai/ixp/message.rb,
lib/rumai/fs.rb,
lib/rumai/wm.rb,
lib/rumai/inochi.rb,
lib/rumai/ixp/transport.rb
Overview
Primitives for the 9P2000 protocol.
See cm.bell-labs.com/sys/man/5/INDEX.html See swtch.com/plan9port/man/man9/
Defined Under Namespace
Modules: Chain, ClientContainer, ExportInstanceMethods, IXP, WidgetImpl Classes: Area, Barlet, Client, Node, View, WidgetNode
Constant Summary collapse
- IXP_SOCK_ADDR =
ENV['WMII_ADDRESS'].sub(/.*!/, '') rescue "/tmp/ns.#{ENV['USER']}.#{display[/:\d+/]}/wmii"
- IXP_FS_ROOT =
Node.new('/')
- FOCUSED_WIDGET_ID =
'sel'.freeze
- FLOATING_AREA_ID =
'~'.freeze
- CLIENT_GROUPING_TAG =
'@'.freeze
- CLIENT_STICKY_TAG =
'/./'.freeze
- PROJECT =
Official name of this project.
'Rumai'
- TAGLINE =
Short single-line description of this project.
'Ruby interface to the wmii window manager'
- WEBSITE =
Address of this project’s official home page.
'http://snk.tuxfamily.org/lib/rumai/'
- VERSION =
Number of this release of this project.
'4.1.0'
- RELDATE =
Date of this release of this project.
'2011-03-28'
- INSTDIR =
Location of this release of this project.
File.('../../..', __FILE__)
- RUNTIME =
RubyGems required by this project during runtime.
{}
- DEVTIME =
RubyGems required by this project during development.
{ 'inochi' => [ '>= 5.0.2', '< 6' ], 'detest' => [ '>= 3.1.0', '< 4' ], # for unit testing }
Class Method Summary collapse
-
.inspect ⇒ Object
Description of this release of this project.
Instance Method Summary collapse
-
#client_ids ⇒ Object
Returns the IDs of the current set of clients.
- #curr_area ⇒ Object
-
#curr_client ⇒ Object
————————————————————————— shortcuts for interactive WM manipulation (via IRB) —————————————————————————.
- #curr_tag ⇒ Object
- #curr_view ⇒ Object
- #focus_area(id) ⇒ Object
- #focus_client(id) ⇒ Object
- #focus_view(id) ⇒ Object
-
#fs ⇒ Object
Returns the root of IXP file system hierarchy.
-
#grouping ⇒ Object
Returns a list of all grouped clients in the currently focused view.
- #next_area ⇒ Object
- #next_client ⇒ Object
- #next_tag ⇒ Object
- #next_view ⇒ Object
- #prev_area ⇒ Object
- #prev_client ⇒ Object
- #prev_tag ⇒ Object
- #prev_view ⇒ Object
-
#tags ⇒ Object
Returns the current set of tags.
-
#views ⇒ Object
Returns the current set of views.
Methods included from ClientContainer
Class Method Details
Instance Method Details
#client_ids ⇒ Object
Returns the IDs of the current set of clients.
1204 1205 1206 1207 1208 |
# File 'lib/rumai/wm.rb', line 1204 def client_ids ary = IXP_FS_ROOT.client.entries ary.delete FOCUSED_WIDGET_ID ary end |
#curr_client ⇒ Object
shortcuts for interactive WM manipulation (via IRB)
1214 |
# File 'lib/rumai/wm.rb', line 1214 def curr_client ; Client.curr ; end |
#curr_tag ⇒ Object
1226 |
# File 'lib/rumai/wm.rb', line 1226 def curr_tag ; curr_view.id ; end |
#focus_area(id) ⇒ Object
1237 1238 1239 |
# File 'lib/rumai/wm.rb', line 1237 def focus_area id Area.focus id end |
#focus_client(id) ⇒ Object
1233 1234 1235 |
# File 'lib/rumai/wm.rb', line 1233 def focus_client id Client.focus id end |
#focus_view(id) ⇒ Object
1241 1242 1243 |
# File 'lib/rumai/wm.rb', line 1241 def focus_view id View.focus id end |
#fs ⇒ Object
Returns the root of IXP file system hierarchy.
1165 1166 1167 |
# File 'lib/rumai/wm.rb', line 1165 def fs IXP_FS_ROOT end |
#grouping ⇒ Object
Returns a list of all grouped clients in the currently focused view. If there are no grouped clients, then the currently focused client is returned in the list.
1191 1192 1193 1194 1195 |
# File 'lib/rumai/wm.rb', line 1191 def grouping list = curr_view.clients.select {|c| c.group? } list << curr_client if list.empty? and curr_client.exist? list end |
#next_area ⇒ Object
1219 |
# File 'lib/rumai/wm.rb', line 1219 def next_area ; curr_area.next ; end |
#next_client ⇒ Object
1215 |
# File 'lib/rumai/wm.rb', line 1215 def next_client ; curr_client.next ; end |
#next_tag ⇒ Object
1227 |
# File 'lib/rumai/wm.rb', line 1227 def next_tag ; next_view.id ; end |
#next_view ⇒ Object
1223 |
# File 'lib/rumai/wm.rb', line 1223 def next_view ; curr_view.next ; end |
#prev_area ⇒ Object
1220 |
# File 'lib/rumai/wm.rb', line 1220 def prev_area ; curr_area.prev ; end |
#prev_client ⇒ Object
1216 |
# File 'lib/rumai/wm.rb', line 1216 def prev_client ; curr_client.prev ; end |
#prev_tag ⇒ Object
1228 |
# File 'lib/rumai/wm.rb', line 1228 def prev_tag ; prev_view.id ; end |
#prev_view ⇒ Object
1224 |
# File 'lib/rumai/wm.rb', line 1224 def prev_view ; curr_view.prev ; end |
#tags ⇒ Object
Returns the current set of tags.
1172 1173 1174 1175 1176 |
# File 'lib/rumai/wm.rb', line 1172 def ary = IXP_FS_ROOT.tag.entries.sort ary.delete FOCUSED_WIDGET_ID ary end |