wob icon indicating copy to clipboard operation
wob copied to clipboard

Render colored bar vertically when width < height

Open jul1u5 opened this issue 4 years ago • 1 comments

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.

jul1u5 avatar Nov 10 '20 14:11 jul1u5

Yay!)

0Karakurt0 avatar Nov 11 '20 13:11 0Karakurt0

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

francma avatar Dec 25 '22 11:12 francma