From: Suraj Kurapati Date: 2010-01-04T05:54:33+09:00 Subject: [ANN] sunaku's Ruby wmiirc - YAML imports Background: This is a Ruby[1] and YAML[2] based configuration of the wmii[3] window manager. It manipulates wmii through the Rumai[4] library, which comes with an interactive shell[5] for live experimentation. [1] http://ruby-lang.org [2] http://yaml.org [3] http://wmii.suckless.org [4] http://snk.tuxfamily.org/lib/rumai/ [5] http://snk.tuxfamily.org/lib/rumai/#Tutorial Announcement: I'm pleased to announce YAML imports, the next milestone in the evolution of my Ruby wmiirc: . The big idea, suggested by Nathan Neff, is that the config.yaml file should be able to import other YAML files ("partials" as I call them). This allows us to share and maintain common code while having a different mix of status applets, keyboard shortcuts, color schemes, and so on. The YAML structure has also changed in this new version, so your old config.yaml will not work as-is. In particular, the following incompatible changes have been made: (1) The "script" section now defines an array: # Arbitrary logic to execute either before or after processing this file. # Any number of "before" and "after" subsections may be defined within # this section. # # script: # - before: # - after: # # ... # script: (2) Keys in the"display:status" section have changed, and the code is evaluated inside a Wmiirc::Status object (see "display/status.yaml" for details). # Status bar applets. # # - : # # refresh: # # script: # # label: # # mouse_action: # : # # You can refresh a particular status bar applet in Ruby using: # # Status["your applet name"].refresh # status: (3) The "control:grab" section was moved to "control:keyboard:grabmod". (4) The "control:key" section was split into "control:action" and "control:keyboard_action" so that the same logic can be shared among keyboard shortcuts and mouse events. # Keyboard shortcuts. # # : # # A key sequence may contain ${...} expressions which # are replaced with the value corresponding to '...' in # the "control:keyboard" section of this configuration. # # For example, if the "control:keyboard" section was: # # control: # keyboard: # foo: Mod4 # bar: y # # and the following key sequence was used: # # ${foo}-${bar},${bar} # # then after ${...} expression replacement, # that key sequence would appear like this: # # Mod4-y,y # keyboard_action: (5) The "program" section was renamed to "prefer". I think that's about it. Cheers. -- Posted via http://www.ruby-forum.com/.