# Path: pwm/config.py
# class Config:
#     def __init__(self):
#     def load(self, default=False):
#     def _load_default(self):
#     def _ensure_config_exists(self, path):
#     def __getattr__(self, name):
# def setup_keys():
# def handle_key_press_event(event):
# def create_arguments(func):
#     def wrapper(*args, **kwargs):


from pwm.config import config
import pwm.windows
# Copyright (c) 2013 Michael Bitzi
# Licensed under the MIT license http://opensource.org/licenses/MIT



class Rule:
    def __init__(self, prop, value, floating=False, workspace=None):
        self.prop = prop
        self.value = value.lower()
        self.floating = floating
        self.workspace = workspace


def _find_rules(wid):
    def _lower(s):
        return s.lower() if s else None

    for rule in config.rules:
        if ((rule.prop == "class" and
             rule.value == _lower(pwm.windows.get_property(
                 wid, "WM_CLASS"))) or

# Path: pwm/config.py
# class Config:
#     def __init__(self):
#     def load(self, default=False):
#     def _load_default(self):
#     def _ensure_config_exists(self, path):
#     def __getattr__(self, name):
# def setup_keys():
# def handle_key_press_event(event):
# def create_arguments(func):
#     def wrapper(*args, **kwargs):


# Path: pwm/rules.py
from pwm.config import config
import pwm.windows

# Copyright (c) 2013 Michael Bitzi
# Licensed under the MIT license http://opensource.org/licenses/MIT



class Rule:
    def __init__(self, prop, value, floating=False, workspace=None):
        self.prop = prop
        self.value = value.lower()
        self.floating = floating
        self.workspace = workspace


def _find_rules(wid):
    def _lower(s):
        return s.lower() if s else None

    for rule in config.rules:
        if ((rule.prop == "class" and
             rule.value == _lower(pwm.windows.get_property(
                 wid, "WM_CLASS"))) or

            (rule.prop == "role" and