colors at launch patch

This commit is contained in:
randomuser 2022-05-17 21:54:14 -05:00
parent 1bbc199286
commit 72d0d47817
1 changed files with 7 additions and 0 deletions

7
x.c
View File

@ -2027,6 +2027,8 @@ usage(void)
int int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
int i;
char *colval;
xw.l = xw.t = 0; xw.l = xw.t = 0;
xw.isfixed = False; xw.isfixed = False;
xsetcursor(cursorshape); xsetcursor(cursorshape);
@ -2071,6 +2073,11 @@ main(int argc, char *argv[])
case 'v': case 'v':
die("%s " VERSION "\n", argv0); die("%s " VERSION "\n", argv0);
break; break;
case 'C':
colval = strtok(EARGF(usage()), "@");
i = atoi(strtok(NULL, "@"));
colorname[i] = colval;
break;
default: default:
usage(); usage();
} ARGEND; } ARGEND;