fix the erroneous back_bar bug _for real_

also add a nice bar script
This commit is contained in:
Pandora 2017-12-08 23:42:07 -05:00
parent c3b893ebc9
commit 380974c56c
No known key found for this signature in database
GPG Key ID: 55DB77C2A03E1EF5
2 changed files with 34 additions and 1 deletions

33
lock_bar.sh Executable file
View File

@ -0,0 +1,33 @@
#!/bin/sh
B='#00000000' # blank
C='#ffffff22' # clear ish
D='#ff00ffcc' # default
T='#ee00eeee' # text
W='#880000bb' # wrong
V='#bb00bbbb' # verifying
./x86_64-pc-linux-gnu/i3lock \
--blur 5 \
--bar-indicator \
--bar-position h \
--bar-direction 1 \
--bar-max-height 50 \
--bar-base-width 50 \
--bar-color 000000cc \
--keyhlcolor 880088cc \
--bar-periodic-step 50 \
--bar-step 50 \
--bar-width 250 \
--redraw-thread \
\
--clock \
--force-clock \
--timepos 125:h-110 \
--timecolor 880088ff \
--datepos 5:ty \
--datecolor 770077ff \
--date-align 1 \
--time-align 1 \
--ringvercolor 8800ff88 \
--ringwrongcolor ff008888

View File

@ -924,7 +924,7 @@ xcb_pixmap_t draw_image(uint32_t *resolution) {
break;
}
if (cur_bar_height != 0 && ((bar_bidirectional && ((cur_bar_height * 2) < bar_base_height))
if (cur_bar_height > 0 && cur_bar_height < bar_base_height && ((bar_bidirectional && ((cur_bar_height * 2) < bar_base_height))
|| (!bar_bidirectional && (cur_bar_height < bar_base_height)))) {
cairo_rectangle(bar_ctx, back_x, back_y, back_width, back_height);
cairo_fill(bar_ctx);