commit 380974c56cf6b277ab9deca9e6dccedd31581f08
parent c3b893ebc9a407a9633b8e8642a65a0d587a6ab8
Author: Pandora <Pandora@techfo.xyz>
Date: Fri, 8 Dec 2017 23:42:07 -0500
fix the erroneous back_bar bug _for real_
also add a nice bar script
Diffstat:
2 files changed, 34 insertions(+), 1 deletion(-)
diff --git a/lock_bar.sh b/lock_bar.sh
@@ -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
diff --git a/unlock_indicator.c b/unlock_indicator.c
@@ -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);