Allow selecting the colors on command line.
Signed-off-by: Christoph Lohmann <20h@r-36.net>
This commit is contained in:
parent
06f6bade81
commit
e68297ed05
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
/* appearance */
|
/* appearance */
|
||||||
static const char font[] = "-*-*-medium-*-*-*-14-*-*-*-*-*-*-*";
|
static const char font[] = "-*-*-medium-*-*-*-14-*-*-*-*-*-*-*";
|
||||||
static const char normbgcolor[] = "#222222";
|
static const char* normbgcolor = "#222222";
|
||||||
static const char normfgcolor[] = "#cccccc";
|
static const char* normfgcolor = "#cccccc";
|
||||||
static const char selbgcolor[] = "#555555";
|
static const char* selbgcolor = "#555555";
|
||||||
static const char selfgcolor[] = "#ffffff";
|
static const char* selfgcolor = "#ffffff";
|
||||||
static const char before[] = "<";
|
static const char before[] = "<";
|
||||||
static const char after[] = ">";
|
static const char after[] = ">";
|
||||||
static const int tabwidth = 200;
|
static const int tabwidth = 200;
|
||||||
|
15
tabbed.1
15
tabbed.1
@ -70,6 +70,21 @@ with the window id, rather than appending it to the end.
|
|||||||
.B \-s
|
.B \-s
|
||||||
will disable automatic spawning of the command.
|
will disable automatic spawning of the command.
|
||||||
.TP
|
.TP
|
||||||
|
.BI \-t " color"
|
||||||
|
defines the selected background color.
|
||||||
|
.IR #RGB ,
|
||||||
|
.IR #RRGGBB ,
|
||||||
|
and X color names are supported.
|
||||||
|
.TP
|
||||||
|
.BI \-T " color"
|
||||||
|
defines the selected foreground color.
|
||||||
|
.TP
|
||||||
|
.BI \-u " color"
|
||||||
|
defines the normal background color.
|
||||||
|
.TP
|
||||||
|
.BI \-U " color"
|
||||||
|
defines the normal foreground color.
|
||||||
|
.TP
|
||||||
.B \-v
|
.B \-v
|
||||||
prints version information to stderr, then exits.
|
prints version information to stderr, then exits.
|
||||||
.SH USAGE
|
.SH USAGE
|
||||||
|
18
tabbed.c
18
tabbed.c
@ -1197,8 +1197,8 @@ char *argv0;
|
|||||||
|
|
||||||
void
|
void
|
||||||
usage(void) {
|
usage(void) {
|
||||||
die("usage: %s [-dfhsv] [-g geometry] [-n name] [-p [s+/-]pos] "
|
die("usage: %s [-dfhsv] [-g geometry] [-n name] [-p [s+/-]pos] [-r narg] "
|
||||||
"[-r narg] command...\n", argv0);
|
"[-u color] [-U color] [-t color] [-T color] command...\n", argv0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -1211,6 +1211,7 @@ main(int argc, char *argv[]) {
|
|||||||
case 'c':
|
case 'c':
|
||||||
closelastclient = True;
|
closelastclient = True;
|
||||||
fillagain = False;
|
fillagain = False;
|
||||||
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
detach = True;
|
detach = True;
|
||||||
break;
|
break;
|
||||||
@ -1242,6 +1243,19 @@ main(int argc, char *argv[]) {
|
|||||||
die("tabbed-"VERSION", © 2009-2012"
|
die("tabbed-"VERSION", © 2009-2012"
|
||||||
" tabbed engineers, see LICENSE"
|
" tabbed engineers, see LICENSE"
|
||||||
" for details.\n");
|
" for details.\n");
|
||||||
|
break;
|
||||||
|
case 't':
|
||||||
|
selbgcolor = EARGF(usage());
|
||||||
|
break;
|
||||||
|
case 'T':
|
||||||
|
selfgcolor = EARGF(usage());
|
||||||
|
break;
|
||||||
|
case 'u':
|
||||||
|
normbgcolor = EARGF(usage());
|
||||||
|
break;
|
||||||
|
case 'U':
|
||||||
|
normfgcolor = EARGF(usage());
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
case 'h':
|
case 'h':
|
||||||
usage();
|
usage();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user