wmiirc-rumai

git clone git://oldgit.suckless.org/wmiirc-rumai/
Log | Files | Refs | README | LICENSE

commit c9c1a5c9e57f4140d4be8dbebed4df4eb5eee478
parent 9f0fd255819a188efba84860c855735378c627e6
Author: Suraj N. Kurapati <sunaku@gmail.com>
Date:   Mon, 18 May 2009 22:01:15 -0700

split 'script' parameter into 'before' and 'after' subsections

Diffstat:
config.rb | 7++++++-
config.yaml | 18+++++++++++-------
2 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/config.rb b/config.rb @@ -240,6 +240,10 @@ end def load_config config_file Object.const_set :CONFIG, YAML.load_file(config_file) + # script + eval CONFIG['script']['before'].to_s, TOPLEVEL_BINDING, + "#{config_file}:script:before" + # display fo = ENV['WMII_FONT'] = CONFIG['display']['font'] fc = ENV['WMII_FOCUSCOLORS'] = CONFIG['display']['color']['focus'] @@ -404,7 +408,8 @@ def load_config config_file end # script - eval CONFIG['script'], TOPLEVEL_BINDING, "#{config_file}:script" + eval CONFIG['script']['after'].to_s, TOPLEVEL_BINDING, + "#{config_file}:script:after" end diff --git a/config.yaml b/config.yaml @@ -768,14 +768,18 @@ control: ## # Arbitrary logic. # -# The given Ruby code is executed *after* this file has been processed. +# script: +# before: <Ruby code to execute before processing this file> +# after: <Ruby code to execute after processing this file> # -script: | - DETACHED_TAG = '|' - ZOOMED_SUFFIX = /~(\d+)$/ +script: + before: | + DETACHED_TAG = '|' + ZOOMED_SUFFIX = /~(\d+)$/ - action 'rehash' + after: | + action 'rehash' - # desktop wallpaper - system 'sh ~/.fehbg' + # desktop wallpaper + system 'sh ~/.fehbg'