francma / wob

A lightweight overlay volume/backlight/progress/anything bar for Wayland.
ISC License
911 stars 50 forks source link

styling with colors #38

Closed eoli3n closed 4 years ago

eoli3n commented 4 years ago

Is there a way to style wob with colors, radius or else ?

njoyard commented 4 years ago

Radius is not possible, wob only draws rectangles.

Colors can be customized either on the command line (see wob --help) or when piping commands to it (eg 42 #aarrggbb #aarrggbb #aarrggbb, colors being background, border and bar respectively).

Geometry can be customized on the command line, too (see wob --help as well).

eoli3n commented 4 years ago

Thanks, is there any way to add the radius feature ?

progandy commented 4 years ago

Thanks, is there any way to add the radius feature ?

Yes, but you'd have to do some maths and calculate the pixels for the arc manually (e.g. Bresenham algorithm) since wob does not use any graphics library.

eoli3n commented 4 years ago

Any exemple to understand ?

progandy commented 4 years ago

Any exemple to understand ?

Here is some information if you want to try to implement it: http://members.chello.at/~easyfilter/bresenham.html

eoli3n commented 4 years ago

I use wob 0.8.1 and i don't see anything related to colors configuration in wob --help. But it works with for exemple echo "45 #929292A #303030AA #929292AA" | wob.

➜ wob --help                                                                                                                                                                                                                        17:36:01
wob: invalid option -- '-'
Usage: wob [options]

  -h        Show help message and quit.
  -v        Show the version number and quit.
  -t <ms>   Hide wob after <ms> milliseconds, defaults to 1000.
  -m <%>    Define the maximum percentage, defaults to 100. 
  -W <px>   Define display width in pixels, defaults to 400. 
  -H <px>   Define display height in pixels, defaults to 50. 
  -o <px>   Define border offset in pixels, defaults to 4. 
  -b <px>   Define border size in pixels, defaults to 4. 
  -p <px>   Define bar padding in pixels, defaults to 4. 
  -a <s>    Define anchor point; one of 'top', 'left', 'right', 'bottom', 'center' (default). 
            May be specified multiple times. 
  -M <px>   Define anchor margin in pixels, defaults to 0. 
  -O <name> Define output to show bar on or '*' for all. If ommited, focused output is chosen.
            May be specified multiple times.

No way to add colors in config file ? it will centralize config and would be easier to implement...

eoli3n commented 4 years ago

For the radius feature, a user friendly config would be great, i can't understand why you can't wrap maths in wob to calculate radius.

EDIT: i just get what you mean. I'm not dev, that's a feature request.

francma commented 4 years ago

No way to add colors in config file ?

No.

Thanks, is there any way to add the radius feature ?

Maybe. Not a priority in my eyes right now.

I use wob 0.8.1 and i don't see anything related to colors configuration in wob --help.

It will be part of a next release.