francma / wob

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

Allow overflow #67

Closed Brod8362 closed 3 years ago

Brod8362 commented 3 years ago

Allows values to go over maximum with the flag -f, --allow-overflow. This will cause the bar to wrap around and display in a color defined by --overflow-color (default is red, #FFFF0000).

Mentioned in issues #22 and #54.

Normal operation: normal

Overflow (with color set to green): overflow

Brod8362 commented 3 years ago

The archlinux and freebsd tests are failing, doesn't seem to be related to the code though.

YerinAlexey commented 3 years ago

Maybe instead of trying to display what's above the overflow you can just fill the bar 100% and set color to overflow-color. Or at least have this as an option?

Brod8362 commented 3 years ago

Added that as --no-wrap. The default behavior is to wrap around, and if --no-wrap is set it will simply display at 100% in the color specified by --overflow-color

YerinAlexey commented 3 years ago

Cool!

CromFr commented 3 years ago

I'm daily driving this PR, it works very well and is very handy for pulseaudio volume feedback :+1:

francma commented 3 years ago

Thank you for this MR. I have fixed the Archlinux CI - should be passing now after rebase.

Also please squash commits into single one.

nichobi commented 3 years ago

Also please squash commits into single one.

Maybe you already know this and have a reason not to, but just wanted to mention that you can squash the commits yourself when merging (see github docs, step 3).

Brod8362 commented 3 years ago

Everything finished. The formatter appears to have taken some... creative liberties around line 557 in main.c.

I can squash the commits if you want me to, but it would probably be tidier to squash it yourself when merging as per @nichobi's comment.

Brod8362 commented 3 years ago

Any updates on this?

francma commented 3 years ago

Sorry for the delay, I've been busy lately :slightly_frowning_face: