parent
b7116d2bdc
commit
f2d155eda9
40
i3lock.c
40
i3lock.c
|
@ -120,15 +120,15 @@ int layout_align = 0;
|
||||||
int modif_align = 0;
|
int modif_align = 0;
|
||||||
int greeter_align = 0;
|
int greeter_align = 0;
|
||||||
|
|
||||||
char time_format[32] = "%H:%M:%S\0";
|
char time_format[64] = "%H:%M:%S\0";
|
||||||
char date_format[32] = "%A, %m %Y\0";
|
char date_format[64] = "%A, %m %Y\0";
|
||||||
|
|
||||||
char verif_font[32] = "sans-serif\0";
|
char verif_font[64] = "sans-serif\0";
|
||||||
char wrong_font[32] = "sans-serif\0";
|
char wrong_font[64] = "sans-serif\0";
|
||||||
char layout_font[32] = "sans-serif\0";
|
char layout_font[64] = "sans-serif\0";
|
||||||
char time_font[32] = "sans-serif\0";
|
char time_font[64] = "sans-serif\0";
|
||||||
char date_font[32] = "sans-serif\0";
|
char date_font[64] = "sans-serif\0";
|
||||||
char greeter_font[32] = "sans-serif\0";
|
char greeter_font[64] = "sans-serif\0";
|
||||||
|
|
||||||
char* fonts[6] = {
|
char* fonts[6] = {
|
||||||
verif_font,
|
verif_font,
|
||||||
|
@ -1728,40 +1728,40 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
// Font stuff
|
// Font stuff
|
||||||
case 520:
|
case 520:
|
||||||
if (strlen(optarg) > 31) {
|
if (strlen(optarg) > 63) {
|
||||||
errx(1, "time font string can be at most 31 characters\n");
|
errx(1, "time font string can be at most 63 characters\n");
|
||||||
}
|
}
|
||||||
strcpy(fonts[TIME_FONT],optarg);
|
strcpy(fonts[TIME_FONT],optarg);
|
||||||
break;
|
break;
|
||||||
case 521:
|
case 521:
|
||||||
if (strlen(optarg) > 31) {
|
if (strlen(optarg) > 63) {
|
||||||
errx(1, "date font string can be at most 31 characters\n");
|
errx(1, "date font string can be at most 63 characters\n");
|
||||||
}
|
}
|
||||||
strcpy(fonts[DATE_FONT],optarg);
|
strcpy(fonts[DATE_FONT],optarg);
|
||||||
break;
|
break;
|
||||||
case 522:
|
case 522:
|
||||||
if (strlen(optarg) > 31) {
|
if (strlen(optarg) > 63) {
|
||||||
errx(1, "verif font string can be at most 31 "
|
errx(1, "verif font string can be at most 63 "
|
||||||
"characters\n");
|
"characters\n");
|
||||||
}
|
}
|
||||||
strcpy(fonts[VERIF_FONT],optarg);
|
strcpy(fonts[VERIF_FONT],optarg);
|
||||||
break;
|
break;
|
||||||
case 523:
|
case 523:
|
||||||
if (strlen(optarg) > 31) {
|
if (strlen(optarg) > 63) {
|
||||||
errx(1, "wrong font string can be at most 31 "
|
errx(1, "wrong font string can be at most 63 "
|
||||||
"characters\n");
|
"characters\n");
|
||||||
}
|
}
|
||||||
strcpy(fonts[WRONG_FONT],optarg);
|
strcpy(fonts[WRONG_FONT],optarg);
|
||||||
break;
|
break;
|
||||||
case 524:
|
case 524:
|
||||||
if (strlen(optarg) > 31) {
|
if (strlen(optarg) > 63) {
|
||||||
errx(1, "layout font string can be at most 31 characters\n");
|
errx(1, "layout font string can be at most 63 characters\n");
|
||||||
}
|
}
|
||||||
strcpy(fonts[LAYOUT_FONT],optarg);
|
strcpy(fonts[LAYOUT_FONT],optarg);
|
||||||
break;
|
break;
|
||||||
case 525:
|
case 525:
|
||||||
if (strlen(optarg) > 31) {
|
if (strlen(optarg) > 63) {
|
||||||
errx(1, "greeter font string can be at most 31 characters\n");
|
errx(1, "greeter font string can be at most 63 characters\n");
|
||||||
}
|
}
|
||||||
strcpy(fonts[GREETER_FONT],optarg);
|
strcpy(fonts[GREETER_FONT],optarg);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue