Skip to content
Browse files

change display:client section into {rule=>regexps}

  • Loading branch information...
1 parent 074cd09 commit ef5c5db4e14278168445986617888227376aafe6 Suraj N. Kurapati committed Feb 23, 2012
Showing with 12 additions and 5 deletions.
  1. +5 −2 README.markdown
  2. +2 −1 lib/wmiirc/config.rb
  3. +5 −2 schema.yaml
View
7 README.markdown
@@ -206,9 +206,12 @@ persisted across multiple instances of the wmiirc.
* **rule:** The wmii "colrules" setting.
- * **client:** Settings for clients handled by wmii.
+ * **client:** Settings for clients handled by wmii. See the documentation
+ for the underlying wmii "rules" setting for more information.
- * **rule:** The wmii "rules" setting.
+ * **_rule to apply_:** Array of strings that represent regular
+ expressions to match against a string containing a newly created
+ client's WM_CLASS and WM_NAME attributes separated by a colon (:).
* **refresh:** Refresh rate for status bar applets (measured in seconds).
View
3 lib/wmiirc/config.rb
@@ -58,7 +58,8 @@ def display
begin
Rumai.fs.ctl.write settings.map {|pair| pair.join(' ') }.join("\n")
Rumai.fs.colrules.write self['display']['column']['rule']
- Rumai.fs.rules.write self['display']['client']['rule']
+ Rumai.fs.rules.write self['display']['client'].
+ map {|rule, regexps| "/#{regexps.join('|')}/ #{rule}" }.join("\n")
rescue Rumai::IXP::Error => error
#
# settings that are not supported in a particular wmii version
View
7 schema.yaml
@@ -140,9 +140,12 @@ mapping:
type: map
required: true
mapping:
- 'rule':
- type: str
+ =:
+ type: seq
required: true
+ sequence:
+ - type: str
+ required: true
'status':
type: seq
required: false

0 comments on commit ef5c5db

Please sign in to comment.
Something went wrong with that request. Please try again.