[ANN] sunaku's Ruby wmiirc - YAML imports

S

Suraj Kurapati

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: <http://github.com/sunaku/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: <Ruby code to execute before processing this file>
# - after: <Ruby code to execute after processing this file>
# # ...
#
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.
#
# - <name>:
#
# refresh: <number of seconds to wait before updating the
label>
#
# script: <Ruby code to evaluate in the Wmiirc::Status
# object that corresponds to this definition.>
#
# label: <Ruby code whose result is displayed as the
# content. This code is placed inside a
# label() method in the Wmiirc::Status object
# that corresponds to this definition.>
#
# mouse_action:
# <mouse event>: <name of 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.
#
# <key sequence>: <name of action>
#
# 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

[ANN] Rumai 3.3.0 0
[ANN] Rumai 3.1.1 0
[ANN] Rumai 3.3.1 0
[ANN] Rumai 3.1.0 0
[ANN] Rumai 2.0.2 1
[ANN] Rumai 3.1.1 0
[ANN] Rumai 2.1.0 0
[ANN] Rumai 3.2.1 (2010-03-22) 0

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top