Coder Social home page Coder Social logo

Add configuration options about wob HOT 11 CLOSED

francma avatar francma commented on May 25, 2024 2
Add configuration options

from wob.

Comments (11)

gennyble avatar gennyble commented on May 25, 2024 1

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.

from wob.

francma avatar francma commented on May 25, 2024 1

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

from wob.

electrickite avatar electrickite commented on May 25, 2024 1

@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

from wob.

Biont avatar Biont commented on May 25, 2024 1

@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.

from wob.

francma avatar francma commented on May 25, 2024 1

@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.

from wob.

francma avatar francma commented on May 25, 2024 1

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

from wob.

7415963987456321 avatar 7415963987456321 commented on May 25, 2024

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.

from wob.

talbergs avatar talbergs commented on May 25, 2024

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

from wob.

electrickite avatar electrickite commented on May 25, 2024

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

from wob.

francma avatar francma commented on May 25, 2024

@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.

from wob.

gennyble avatar gennyble commented on May 25, 2024

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?

from wob.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.