mirror of
https://github.com/0intro/wmii
synced 2025-01-22 01:52:06 +03:00
added -t <default tag> to wmiiwm
This commit is contained in:
parent
8874f818a1
commit
0d333433ab
@ -24,7 +24,7 @@ static char version[] = "wmiiwm - " VERSION ", (C)opyright MMIV-MMVI Anselm R. G
|
||||
static void
|
||||
usage()
|
||||
{
|
||||
fprintf(stderr, "%s", "usage: wmiiwm -a <address> [-c] [-v]\n");
|
||||
fprintf(stderr, "%s", "usage: wmiiwm -a <address> [-t <default tag>] [-c] [-v]\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -222,6 +222,7 @@ main(int argc, char *argv[])
|
||||
XSetWindowAttributes wa;
|
||||
|
||||
/* command line args */
|
||||
def.tag[0] = 0;
|
||||
if(argc > 1) {
|
||||
for(i = 1; (i < argc) && (argv[i][0] == '-'); i++) {
|
||||
switch (argv[i][1]) {
|
||||
@ -232,6 +233,9 @@ main(int argc, char *argv[])
|
||||
case 'c':
|
||||
checkwm = 1;
|
||||
break;
|
||||
case 't':
|
||||
cext_strlcpy(def.tag, argv[++i], sizeof(def.tag));
|
||||
break;
|
||||
case 'a':
|
||||
if(i + 1 < argc)
|
||||
address = argv[++i];
|
||||
@ -309,7 +313,8 @@ main(int argc, char *argv[])
|
||||
def.font = strdup(BLITZ_FONT);
|
||||
def.border = DEF_BORDER;
|
||||
def.snap = DEF_SNAP;
|
||||
cext_strlcpy(def.tag, "1", sizeof(def.tag));
|
||||
if(!strlen(def.tag))
|
||||
cext_strlcpy(def.tag, "1", sizeof(def.tag));
|
||||
cext_strlcpy(def.selcolor, BLITZ_SELCOLORS, sizeof(def.selcolor));
|
||||
blitz_loadcolor(dpy, screen, def.selcolor, &def.sel);
|
||||
cext_strlcpy(def.normcolor, BLITZ_NORMCOLORS, sizeof(def.normcolor));
|
||||
|
Loading…
Reference in New Issue
Block a user