Added man page and changed usage message.
parent
7736560ae5
commit
fa4e0c27ab
|
|
@ -0,0 +1,26 @@
|
||||||
|
.TH dwl-bar 1 dwl-bar\-VERSION
|
||||||
|
.SH NAME
|
||||||
|
dwl-bar \- dwm-like bar for dwl
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B dwl-bar
|
||||||
|
.RB [\-v]
|
||||||
|
.SH DESCRIPTION
|
||||||
|
dwl-bar is a status bar for dwl.
|
||||||
|
.SH OPTIONS
|
||||||
|
.B \-h
|
||||||
|
prints help message and exits.
|
||||||
|
.B \-v
|
||||||
|
prints version and exits.
|
||||||
|
.SH USAGE
|
||||||
|
.SS Status
|
||||||
|
.TP
|
||||||
|
.B $XDG_RUNTIME_DIR/dwl-bar-x
|
||||||
|
can be written into with the prefix 'status' to change the bar's status.
|
||||||
|
.SS Mouse Commands
|
||||||
|
.TP
|
||||||
|
.B Middle Button
|
||||||
|
Click the middle mouse button on the status label to open a terminal.
|
||||||
|
.SH CUSTOMIZATION
|
||||||
|
dwl-bar is customized through config.def.h and (re)compiling.
|
||||||
|
.SH SEE ALSO
|
||||||
|
.BR dwl (1)
|
||||||
|
|
@ -815,13 +815,13 @@ int main(int argc, char *argv[]) {
|
||||||
while ((opt = getopt(argc, argv, "vh")) != -1) {
|
while ((opt = getopt(argc, argv, "vh")) != -1) {
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
case 'h':
|
case 'h':
|
||||||
printf("Usage: [-h] [-v]\n");
|
printf("Usage: %s [-h] [-v]\n", argv[0]);
|
||||||
printf(" -h: show this\n");
|
printf(" -h: show this\n");
|
||||||
printf(" -v: get version\n");
|
printf(" -v: get version\n");
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
||||||
case 'v':
|
case 'v':
|
||||||
printf("A Version");
|
printf("dwl %f", VERSION);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue