francma / wob

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

Render colored bar vertically when width < height #57

Closed jul1u5 closed 1 year ago

jul1u5 commented 4 years ago

Feature

Closes #44. I have implemented @0Karakurt0 suggestion which doesn't provide a rotation option but changes the orientation of the bar when the width of the bar is greater than its height.

Example:

$ tail -f $SWAYSOCK.wob | wob -W 64 -H 256

20201110_16h15m41s_grim

Implementation

In the wob_draw_percentage function, I wrapped the existing logic for drawing horizontal colored bar in an if condition and added a new branch for rendering the bar vertically. The logic for drawing the bar vertically is a bit different: I used a for loop instead of memcpy. Not sure about the performance implications of this.

0Karakurt0 commented 4 years ago

Yay!)

francma commented 1 year ago

Closed in favor of https://github.com/francma/wob/pull/108