tweak indicator stuff
This commit is contained in:
parent
f2ef5989e1
commit
5aaf5a293e
5
i3lock.c
5
i3lock.c
|
@ -78,6 +78,7 @@ int screen_number = -1;
|
|||
int internal_line_source = 0;
|
||||
/* bool for showing the clock; why am I commenting this? */
|
||||
bool show_clock = false;
|
||||
bool show_indicator = false;
|
||||
/* time formatter strings for date/time
|
||||
I picked 32-length char arrays because some people might want really funky time formatters.
|
||||
Who am I to judge?
|
||||
|
@ -910,6 +911,7 @@ int main(int argc, char *argv[]) {
|
|||
{"screen", required_argument, NULL, 'S'},
|
||||
|
||||
{"clock", no_argument, NULL, 'k'},
|
||||
{"indicator", no_argument, NULL, 0},
|
||||
{"timestr", required_argument, NULL, 0},
|
||||
{"datestr", required_argument, NULL, 0},
|
||||
{"timefont", required_argument, NULL, 0},
|
||||
|
@ -1008,6 +1010,9 @@ int main(int argc, char *argv[]) {
|
|||
case 0:
|
||||
if (strcmp(longopts[optind].name, "debug") == 0)
|
||||
debug_mode = true;
|
||||
else if (strcmp(longopts[optind].name, "indicator") == 0) {
|
||||
show_indicator = true;
|
||||
}
|
||||
else if (strcmp(longopts[optind].name, "insidevercolor") == 0) {
|
||||
char *arg = optarg;
|
||||
|
||||
|
|
|
@ -80,6 +80,7 @@ extern int internal_line_source;
|
|||
extern int screen_number;
|
||||
|
||||
extern bool show_clock;
|
||||
extern bool show_indicator;
|
||||
extern char time_format[32];
|
||||
extern char date_format[32];
|
||||
extern char time_font[32];
|
||||
|
@ -301,7 +302,7 @@ xcb_pixmap_t draw_image(uint32_t *resolution) {
|
|||
timeinfo = localtime(&rawtime);
|
||||
|
||||
if (unlock_indicator &&
|
||||
(unlock_state >= STATE_KEY_PRESSED || auth_state > STATE_AUTH_IDLE)) {
|
||||
(unlock_state >= STATE_KEY_PRESSED || auth_state > STATE_AUTH_IDLE || show_indicator)) {
|
||||
cairo_scale(ctx, scaling_factor(), scaling_factor());
|
||||
/* Draw a (centered) circle with transparent background. */
|
||||
cairo_set_line_width(ctx, 7.0);
|
||||
|
|
Loading…
Reference in New Issue