okraits / j4-make-config

Universal theme switcher and config generator for the i3 wm
http://www.okraits.de/index.php?section=projects&page=j4-make-config
185 stars 22 forks source link

Themes compatible with i3-style format #2

Open acrisci opened 10 years ago

acrisci commented 10 years ago

Hi, wondering if you would be interested in making some tweaks to your theme format to make them compatible with i3-style format like we talked about.

I think it would take representing your themes as an object kind of like this:

templates:
  settings:
    interpolate: /#\s\$(.+?)\n/g
  i3-theme-window: |
    client.focused          \#005577 \#005577 \#eeeeee \#0099bb
    client.focused_inactive \#444444 \#444444 \#eeeeee \#666666
    client.unfocused        \#222222 \#222222 \#bbbbbb \#222222
    client.urgent           \#700000 \#700000 \#eeeeee \#700000
  i3-theme-bar: |
    colors {
        background \#222222
        statusline \#eeeeee
        separator  \#444444

        focused_workspace  \#005577 \#005577 \#eeeeee
        active_workspace   \#444444 \#444444 \#eeeeee
        inactive_workspace \#222222 \#222222 \#bbbbbb
        urgent_workspace   \#770000 \#770000 \#eeeeee
    }

Or something (the regex is tricky) and then I could write that into the spec and it could be implemented so you wouldn't have to change any of the base files.

Just a thought. I wouldn't mind helping to implement it. I know it's a big change to your design, so feel free to reject this with no hard feelings.

wei2912 commented 10 years ago

It might not really meet the goal of j4-make-config, since it seems to me that @okraits wants pure i3 config syntax (is that right?).

okraits commented 10 years ago

I don't want to decide about it now. As i3-style has less features than j4-make-config (and j4-make-config provides all features of i3-style) right now, i don't see any need to support another theme format besides the native i3 config syntax.

Additionally, by using the native i3 config syntax, even people not using j4-make-config can paste a theme into their config without the need to convert it to native i3 config syntax before like they would have to do with a theme in the i3-style format.