diff --git a/Makefile b/Makefile index b0c9326..4862456 100644 --- a/Makefile +++ b/Makefile @@ -84,6 +84,7 @@ help: @echo clean: Removes objects and tarballs. @echo man: Generate man page for spmenu @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 help: Displays this help sheet. @@ -102,4 +103,9 @@ pkg_arch: dist rm -rf src/ pkg/ *.tar.gz 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 diff --git a/libs/argv.c b/libs/argv.c index 9e854ed..3eeb95e 100644 --- a/libs/argv.c +++ b/libs/argv.c @@ -347,6 +347,7 @@ readargs(int argc, char *argv[]) void usage(void) { + // print help fputs("spmenu: dynamic menu\n\n" "- Arguments -\n" "spmenu -l, --lines Set line count to stdin\n" @@ -391,6 +392,7 @@ usage(void) "spmenu -c, --center Position spmenu at the center of the screen\n" "\n", stdout); + // more args fputs("spmenu -hm, --hide-mode Hide mode indicator\n" "spmenu -hmc, --hide-match-count Hide match count\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" "\n", stdout); + // colors fputs("- Appearance arguments -\n" "spmenu -fn, --font Set the spmenu font to \n" "spmenu -nif, --normal-item-foreground Set the normal item foreground color\n" @@ -463,6 +466,8 @@ usage(void) "spmenu -cc, --caret-foreground Set the caret color\n" "spmenu -bc, --border-background Set the border color\n" "\n", stdout); + + // sgr sequences fputs("spmenu -sgr0, --sgr0 Set the SGR 0 color\n" "spmenu -sgr1, --sgr1 Set the SGR 1 color\n" "spmenu -sgr2, --sgr2 Set the SGR 2 color\n" @@ -480,6 +485,8 @@ usage(void) "spmenu -sgr14, --sgr14 Set the SGR 14 color\n" "spmenu -sgr15, --sgr15 Set the SGR 15 color\n" "\n", stdout); + + // dmenu compat fputs("- dmenu compatibility -\n" "spmenu -S Don't sort matches\n" "spmenu -i Use case-insensitive matching\n" @@ -488,5 +495,6 @@ usage(void) "spmenu -sb Set the selected background color\n" "spmenu -sf Set the selected foreground color\n" , stdout); + exit(1); }