Skip to content

Commit

Permalink
change display:client section into {rule=>regexps}
Browse files Browse the repository at this point in the history
  • Loading branch information
sunaku committed Feb 23, 2012
1 parent 074cd09 commit ef5c5db
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
7 changes: 5 additions & 2 deletions README.markdown
Expand Up @@ -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).

Expand Down
3 changes: 2 additions & 1 deletion lib/wmiirc/config.rb
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions schema.yaml
Expand Up @@ -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
Expand Down

0 comments on commit ef5c5db

Please sign in to comment.