Added man page and changed usage message.

このコミットが含まれているのは:
MadcowOG 2023-02-28 02:16:01 -08:00
コミット fa4e0c27ab
2個のファイルの変更28行の追加2行の削除

26
dwl-bar.1 ノーマルファイル
ファイルの表示

@ -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) {
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);
}
}