thefryscorer / schemer2

Terminal Colorscheme Generator and Converter
243 stars 9 forks source link

Output format for i3 #3

Closed tekknolagi closed 7 years ago

tekknolagi commented 7 years ago

Hi,

It would be awesome if it could output a partial i3 config, like so:

client.focused          #3F8AC2 #096BAA #00BAA7 #00DA8E
client.focused_inactive #333333 #5F676A #ffffff #484e50
client.unfocused        #333333 #424242 #888888 #292d2e
client.urgent           #C10004 #900000 #ffffff #900000
thefryscorer commented 7 years ago

Hi,

I agree that an i3 config would be a good output format to add. I'm a bit strapped for time at the moment, and not familiar with i3's config format, but I could take a look in a few days.

If you want to add this output format yourself, I'd accept a pull request. I'm thinking of adding a template system for output formats to make it easier for people to add their own, but that will probably be a while off yet.

thefryscorer commented 7 years ago

I've looked into i3's configuration format, and I'm not sure it's something schemer could reasonably output, the reason being that I don't think schemer should be able to set fields such as background color, border color or text color. It's not a very clever script and has no notion of what colors are readable (or nice) when contrasted against other colors.

One way to do this might be have schemer change only the background color, but then it would still need to output something for the text color, and that's really an individual preference (same reason schemer doesn't specify terminal background, cursor or default text colors where possible).

If you want to use colors from schemer in an i3 config, I'd suggest using the xterm/xresources output option, then using variables as seen here in your i3 config to specify background colors (for example) to use those values, whilst keeping individual preference for the others. This reddit post has an example of how to do this. It does seem to require a newer version of i3 than my distro has packaged so be aware of that.