# Path: i3configger/config.py
# class MARK:
# class I3configgerConfig:
#     COMMENT = "#"
#     SET = "set"
#     VAR = "$"
# SUFFIX = ".conf"
# I3BAR = "i3bar"
# DEFAULTS = {
#     "main": {
#         "target": "../config",
#         "i3_refresh_msg": "reload",
#         "status_command": "i3status",
#         "log": None,
#         "notify": False,
#     },
#     "bars": {
#         "defaults": {"template": "tpl", "target": "..", "select": "default"},
#         "targets": {},
#     },
# }
# CONFIG_CANDIDATES = [
#     Path("~/.i3").expanduser(),
#     Path(os.getenv("XDG_CONFIG_HOME", "~/.config/")).expanduser() / "i3",
# ]
#     PARTIALS_NAME = "config.d"
#     CONFIG_NAME = "i3configger.json"
#     MESSAGES_NAME = ".messages.json"
#     def __init__(self, load=True):
#     def __str__(self):
#     def load(self):
#     def get_bar_targets(self):
# def fetch(path: Path) -> dict:
# def freeze(path, obj):
# def ensure_i3_configger_sanity():
# def get_i3wm_config_path():


from i3configger import config

    [--release] [--border] [--whole-window] [<Modifiers>+]button<n> command
    """

    def __init__(self, content):
        self.content = content

    def get_all_bindings(self):
        lines = [l.strip() for l in self.content.splitlines()]
        lines = [l for l in lines if any(m in l for m in [BINDCODE, BINDSYM])]
        lines = [l for l in lines if not l.startswith(config.MARK.COMMENT)]
        return sorted(set(lines))

    def translate_bindings(self):
        """translate bindcode to bindsym assignments

        this need to be done the moment the information is asked because it
        depends on the currently active layout.
        """
        raise NotImplementedError()

    def write_bindings_info(self):
        """Write info in some format that can be nicely displayed"""
        raise NotImplementedError()


if __name__ == "__main__":
    # use partials and account for modes
    # a naming convention would make this quite easy
    # mode-<modename>.conf -> bindings active in <modename>

# Path: i3configger/config.py
# class MARK:
# class I3configgerConfig:
#     COMMENT = "#"
#     SET = "set"
#     VAR = "$"
# SUFFIX = ".conf"
# I3BAR = "i3bar"
# DEFAULTS = {
#     "main": {
#         "target": "../config",
#         "i3_refresh_msg": "reload",
#         "status_command": "i3status",
#         "log": None,
#         "notify": False,
#     },
#     "bars": {
#         "defaults": {"template": "tpl", "target": "..", "select": "default"},
#         "targets": {},
#     },
# }
# CONFIG_CANDIDATES = [
#     Path("~/.i3").expanduser(),
#     Path(os.getenv("XDG_CONFIG_HOME", "~/.config/")).expanduser() / "i3",
# ]
#     PARTIALS_NAME = "config.d"
#     CONFIG_NAME = "i3configger.json"
#     MESSAGES_NAME = ".messages.json"
#     def __init__(self, load=True):
#     def __str__(self):
#     def load(self):
#     def get_bar_targets(self):
# def fetch(path: Path) -> dict:
# def freeze(path, obj):
# def ensure_i3_configger_sanity():
# def get_i3wm_config_path():


# Path: i3configger/bindings.py
from i3configger import config


    [--release] [--border] [--whole-window] [<Modifiers>+]button<n> command
    """

    def __init__(self, content):
        self.content = content

    def get_all_bindings(self):
        lines = [l.strip() for l in self.content.splitlines()]
        lines = [l for l in lines if any(m in l for m in [BINDCODE, BINDSYM])]
        lines = [l for l in lines if not l.startswith(config.MARK.COMMENT)]
        return sorted(set(lines))

    def translate_bindings(self):
        """translate bindcode to bindsym assignments

        this need to be done the moment the information is asked because it
        depends on the currently active layout.
        """
        raise NotImplementedError()

    def write_bindings_info(self):
        """Write info in some format that can be nicely displayed"""
        raise NotImplementedError()


if __name__ == "__main__":
    # use partials and account for modes
    # a naming convention would make this quite easy
    # mode-<modename>.conf -> bindings active in <modename>

    p = config.I3configgerConfig().targetPath