some comments

This commit is contained in:
speedie 2023-03-28 19:57:26 +02:00
parent f08e91e3e2
commit 942978f32c
2 changed files with 15 additions and 1 deletions

View file

@ -84,6 +84,7 @@ help:
@echo clean: Removes objects and tarballs. @echo clean: Removes objects and tarballs.
@echo man: Generate man page for spmenu @echo man: Generate man page for spmenu
@echo compat: Installs compatibility with dmenu. WARNING: This will overwrite dmenu and dmenu_run @echo compat: Installs compatibility with dmenu. WARNING: This will overwrite dmenu and dmenu_run
@echo commit: Commit to the repository
@echo pkg_arch: Creates an Arch package based on the PKGBUILD @echo pkg_arch: Creates an Arch package based on the PKGBUILD
@echo help: Displays this help sheet. @echo help: Displays this help sheet.
@ -102,4 +103,9 @@ pkg_arch: dist
rm -rf src/ pkg/ *.tar.gz rm -rf src/ pkg/ *.tar.gz
cp PKGBUILD spmenu-$(VERSION).PKGBUILD; mv PKGBUILD.orig PKGBUILD cp PKGBUILD spmenu-$(VERSION).PKGBUILD; mv PKGBUILD.orig PKGBUILD
.PHONY: all options clean dist install uninstall pkg_arch help man commit: man
command -v git > /dev/null || exit 1
git commit -a
git push origin master
.PHONY: all options clean dist install uninstall pkg_arch help man commit

View file

@ -347,6 +347,7 @@ readargs(int argc, char *argv[])
void void
usage(void) usage(void)
{ {
// print help
fputs("spmenu: dynamic menu\n\n" fputs("spmenu: dynamic menu\n\n"
"- Arguments -\n" "- Arguments -\n"
"spmenu -l, --lines <line> Set line count to stdin\n" "spmenu -l, --lines <line> Set line count to stdin\n"
@ -391,6 +392,7 @@ usage(void)
"spmenu -c, --center Position spmenu at the center of the screen\n" "spmenu -c, --center Position spmenu at the center of the screen\n"
"\n", stdout); "\n", stdout);
// more args
fputs("spmenu -hm, --hide-mode Hide mode indicator\n" fputs("spmenu -hm, --hide-mode Hide mode indicator\n"
"spmenu -hmc, --hide-match-count Hide match count\n" "spmenu -hmc, --hide-match-count Hide match count\n"
"spmenu -hla, --hide-left-arrow Hide left arrow\n" "spmenu -hla, --hide-left-arrow Hide left arrow\n"
@ -433,6 +435,7 @@ usage(void)
"spmenu -v, --version Print spmenu version to stdout\n" "spmenu -v, --version Print spmenu version to stdout\n"
"\n", stdout); "\n", stdout);
// colors
fputs("- Appearance arguments -\n" fputs("- Appearance arguments -\n"
"spmenu -fn, --font <font> Set the spmenu font to <font>\n" "spmenu -fn, --font <font> Set the spmenu font to <font>\n"
"spmenu -nif, --normal-item-foreground <color> Set the normal item foreground color\n" "spmenu -nif, --normal-item-foreground <color> Set the normal item foreground color\n"
@ -463,6 +466,8 @@ usage(void)
"spmenu -cc, --caret-foreground <color> Set the caret color\n" "spmenu -cc, --caret-foreground <color> Set the caret color\n"
"spmenu -bc, --border-background <color> Set the border color\n" "spmenu -bc, --border-background <color> Set the border color\n"
"\n", stdout); "\n", stdout);
// sgr sequences
fputs("spmenu -sgr0, --sgr0 <color> Set the SGR 0 color\n" fputs("spmenu -sgr0, --sgr0 <color> Set the SGR 0 color\n"
"spmenu -sgr1, --sgr1 <color> Set the SGR 1 color\n" "spmenu -sgr1, --sgr1 <color> Set the SGR 1 color\n"
"spmenu -sgr2, --sgr2 <color> Set the SGR 2 color\n" "spmenu -sgr2, --sgr2 <color> Set the SGR 2 color\n"
@ -480,6 +485,8 @@ usage(void)
"spmenu -sgr14, --sgr14 <color> Set the SGR 14 color\n" "spmenu -sgr14, --sgr14 <color> Set the SGR 14 color\n"
"spmenu -sgr15, --sgr15 <color> Set the SGR 15 color\n" "spmenu -sgr15, --sgr15 <color> Set the SGR 15 color\n"
"\n", stdout); "\n", stdout);
// dmenu compat
fputs("- dmenu compatibility -\n" fputs("- dmenu compatibility -\n"
"spmenu -S Don't sort matches\n" "spmenu -S Don't sort matches\n"
"spmenu -i Use case-insensitive matching\n" "spmenu -i Use case-insensitive matching\n"
@ -488,5 +495,6 @@ usage(void)
"spmenu -sb <color> Set the selected background color\n" "spmenu -sb <color> Set the selected background color\n"
"spmenu -sf <color> Set the selected foreground color\n" "spmenu -sf <color> Set the selected foreground color\n"
, stdout); , stdout);
exit(1); exit(1);
} }