Added man page and changed usage message.

master
MadcowOG 2023-02-28 02:16:01 -08:00
parent 7736560ae5
commit fa4e0c27ab
2 changed files with 28 additions and 2 deletions

26
dwl-bar.1 Normal file
View File

@ -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)

View File

@ -815,13 +815,13 @@ int main(int argc, char *argv[]) {
while ((opt = getopt(argc, argv, "vh")) != -1) {
switch (opt) {
case 'h':
printf("Usage: [-h] [-v]\n");
printf("Usage: %s [-h] [-v]\n", argv[0]);
printf(" -h: show this\n");
printf(" -v: get version\n");
exit(0);
case 'v':
printf("A Version");
printf("dwl %f", VERSION);
exit(0);
}
}