Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration options #7

Closed
electrickite opened this issue Oct 6, 2019 · 11 comments
Closed

Add configuration options #7

electrickite opened this issue Oct 6, 2019 · 11 comments

Comments

@electrickite
Copy link

Add command line configuration options, similar to xob. It would be great to have at least the maximum and timeout options. Style configuration would also be nice to have, but does not seem as critical.

Does this seem like something you would like to add? If so I'd be happy to submit a PR.

@7415963987456321
Copy link
Contributor

7415963987456321 commented Oct 6, 2019

I have a pull request implementing the timeout option here: #9
I'll start working on the maximum feature soon but I'd like to see #9 merged first.
EDIT:
@electrickite #9 has been merged and a pull request for the max feature is in #14.

@gennyble
Copy link
Contributor

Can I try and get style configuration? I was thinking of allowing an rgba value be passed on the command line for the foreground and background.

@talbergs
Copy link

Style and position could be configured in ~/.config/wob

@electrickite
Copy link
Author

For example, xob handles styles in ~/.config/xob/styles.cfg: https://github.com/florentc/xob#appearance

The config parser is here, although the licenses of the two projects are incompatible, so it couldn't be used directly: https://github.com/florentc/xob/blob/master/src/conf.c

@francma
Copy link
Owner

francma commented Oct 18, 2019

I would prefer not to have a configuration file. My idea for color configuration is to have it as optional value on input.

10
14 #AARRBBGG #AARRBBGG
...

Then adding coloring to volume would be done like this:

pamixer -ui 2 && pamixer --get-volume | sed 's/$/ \#AARRGGBB #AARRGGBB/' > $SWAYSOCK.wob

@electrickite
Copy link
Author

@francma Seems like a flexible approach. If that’s the case, would it also make sense to be able to add the max value in the same way? Use case being a single fifo shared by several systems with different scales. Ex:

10
37 #AABBRRGG #AARRBBGG
7500 15000 #AARRBBGG #AARRBBGG

@Biont
Copy link

Biont commented Oct 19, 2019

@francma Have you thought about my comment on your reddit post, specifically the option to make the columns configurable with associative arguments (like --column-color1=2 --column-color2=3, but probably a bit more concise)?

This would solve the problem of having to establish, document and maintain fixed rule about how the input line should be structured. Let's say you define VALUE COLOR1 COLOR2 MAX at first. Then for some reason you want to support a third color: You'd either have live with a cumbersome and strange syntax (since there's an unrelated argument right in the middle of the color config), or break all existing usages and force people to update their scripts.

Also, what if I really only care about setting the MAX dynamically, leaving colors alone? I'd have to carry along the default colors whenever I add something to the pipe even though the specific script accessing the pipe might not even know what they are.

@francma
Copy link
Owner

francma commented Oct 20, 2019

@francma Seems like a flexible approach. If that’s the case, would it also make sense to be able to add the max value in the same way? Use case being a single fifo shared by several systems with different scales. Ex:

10
37 #AABBRRGG #AARRBBGG
7500 15000 #AARRBBGG #AARRBBGG

I think that this should be solved with multiple wob instances.

@francma
Copy link
Owner

francma commented Oct 20, 2019

@Biont I would rather keep complexity in external scripts than in wob. I think it's not gonna be everyday that we introduce breaking changes.

@gennyble
Copy link
Contributor

gennyble commented Oct 23, 2019

Would it be worth trying to parse a configuration file at ~/.config/wob/styles.cfg (if present) so that wob can be a drop-in replacement for xob? Or is that not a goal of wob?

@francma
Copy link
Owner

francma commented Oct 28, 2019

@genuinebyte I'm not planning on making wob drop in replacement for xob.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants