Module: Rumai
- Extends:
- Rumai::ExportInstanceMethods
- Includes:
- Rumai::ClientContainer
- 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, Client, Node, View, WidgetNode
Constant Summary
- 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
- INSTDIR =
File.('../../..', __FILE__)
Class Method Summary
Instance Method Summary
-
- (Object) client_ids
Returns the IDs of the current set of clients.
- - (Object) curr_area
-
- (Object) curr_client
shortcuts for interactive WM manipulation (via IRB) --------------------------------------------------.
- - (Object) curr_tag
- - (Object) curr_view
- - (Object) focus_area(id)
- - (Object) focus_client(id)
- - (Object) focus_view(id)
-
- (Object) fs
Returns the root of IXP file system hierarchy.
-
- (Object) grouping
Returns a list of all grouped clients in the currently focused view.
- - (Object) 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
Returns the current set of tags.
-
- (Object) views
Returns the current set of views.
Methods included from Rumai::ClientContainer
Class Method Details
+ (Object) inspect
31 32 33 |
# File 'lib/rumai/inochi.rb', line 31 def self.inspect "#{PROJECT} #{VERSION} (#{RELEASE})" end |
Instance Method Details
- (Object) client_ids
Returns the IDs of the current set of clients.
1044 1045 1046 1047 1048 |
# File 'lib/rumai/wm.rb', line 1044 def client_ids ary = IXP_FS_ROOT.client.entries ary.delete FOCUSED_WIDGET_ID ary end |
- (Object) curr_area
1070 |
# File 'lib/rumai/wm.rb', line 1070 def curr_area ; Area.curr ; end |
- (Object) curr_client
shortcuts for interactive WM manipulation (via IRB)
1066 |
# File 'lib/rumai/wm.rb', line 1066 def curr_client ; Client.curr ; end |
- (Object) curr_tag
1078 |
# File 'lib/rumai/wm.rb', line 1078 def curr_tag ; curr_view.id ; end |
- (Object) curr_view
1074 |
# File 'lib/rumai/wm.rb', line 1074 def curr_view ; View.curr ; end |
- (Object) focus_area(id)
1089 1090 1091 |
# File 'lib/rumai/wm.rb', line 1089 def focus_area id Area.focus id end |
- (Object) focus_client(id)
1085 1086 1087 |
# File 'lib/rumai/wm.rb', line 1085 def focus_client id Client.focus id end |
- (Object) focus_view(id)
1093 1094 1095 |
# File 'lib/rumai/wm.rb', line 1093 def focus_view id View.focus id end |
- (Object) fs
Returns the root of IXP file system hierarchy.
1019 1020 1021 |
# File 'lib/rumai/wm.rb', line 1019 def fs IXP_FS_ROOT end |
- (Object) grouping
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.
1056 1057 1058 1059 1060 |
# File 'lib/rumai/wm.rb', line 1056 def grouping list = curr_view.clients.select {|c| c.group? } list << curr_client if list.empty? and curr_client.exist? list end |
- (Object) next_area
1071 |
# File 'lib/rumai/wm.rb', line 1071 def next_area ; curr_area.next ; end |
- (Object) next_client
1067 |
# File 'lib/rumai/wm.rb', line 1067 def next_client ; curr_client.next ; end |
- (Object) next_tag
1079 |
# File 'lib/rumai/wm.rb', line 1079 def next_tag ; next_view.id ; end |
- (Object) next_view
1075 |
# File 'lib/rumai/wm.rb', line 1075 def next_view ; curr_view.next ; end |
- (Object) prev_area
1072 |
# File 'lib/rumai/wm.rb', line 1072 def prev_area ; curr_area.prev ; end |
- (Object) prev_client
1068 |
# File 'lib/rumai/wm.rb', line 1068 def prev_client ; curr_client.prev ; end |
- (Object) prev_tag
1080 |
# File 'lib/rumai/wm.rb', line 1080 def prev_tag ; prev_view.id ; end |
- (Object) prev_view
1076 |
# File 'lib/rumai/wm.rb', line 1076 def prev_view ; curr_view.prev ; end |
- (Object) tags
Returns the current set of tags.
1026 1027 1028 1029 1030 |
# File 'lib/rumai/wm.rb', line 1026 def ary = IXP_FS_ROOT.tag.entries.sort ary.delete FOCUSED_WIDGET_ID ary end |
- (Object) views
Returns the current set of views.
1035 1036 1037 |
# File 'lib/rumai/wm.rb', line 1035 def views .map! {|t| View.new t } end |