From 4747fbc23786ef1ae80d97803e329121e394e893 Mon Sep 17 00:00:00 2001 From: randomuser Date: Sun, 26 Jun 2022 01:24:05 -0500 Subject: [PATCH] add manpage and adjust exitcode --- c/colors.c | 2 +- man/colors.1 | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 man/colors.1 diff --git a/c/colors.c b/c/colors.c index 3c6ea86..b6f52b5 100644 --- a/c/colors.c +++ b/c/colors.c @@ -276,7 +276,7 @@ int main(int argc, char **argv) { if(settings.c) { c = check_colors(colors); if(c == 0) { - return 2; + return 1; } } diff --git a/man/colors.1 b/man/colors.1 new file mode 100644 index 0000000..e25818a --- /dev/null +++ b/man/colors.1 @@ -0,0 +1,32 @@ +.TH COLORS 1 colors +.SH NAME +colors \- generate colorscheme and run hooks +.SH SYNOPSIS +.B colors [-hefc] [-w path] +.SH OPTIONS +.TP +.B -h +disable running hooks (implies -e) +.TP +.B -e +echo colors to stdout +.TP +.B -c +check colors using color checking algorithm +.TP +.B -f +print wallpaper filename to stdout +.TP +.B -w +provide wallpaper path +.SH HOOKS +When -h is not used, a program at ~/.config/cwal/handler is executed. The first sixteen arguments are the colors in the colorscheme, and the seventeenth argument is the filename. +.SH EXIT CODES +.TP +.B 0 +Normal exit code +.TP +.B 1 +check_colors(...) failed. +.SH AUTHOR +randomuser