From 380974c56cf6b277ab9deca9e6dccedd31581f08 Mon Sep 17 00:00:00 2001 From: Pandora Date: Fri, 8 Dec 2017 23:42:07 -0500 Subject: [PATCH] fix the erroneous back_bar bug _for real_ also add a nice bar script --- lock_bar.sh | 33 +++++++++++++++++++++++++++++++++ unlock_indicator.c | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100755 lock_bar.sh diff --git a/lock_bar.sh b/lock_bar.sh new file mode 100755 index 0000000..52a5173 --- /dev/null +++ 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 index f39db9f..b9b25dc 100644 --- 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);