commit 75faf30e2ae5341a4a9586ebf08cb48e4d5847f2 from: Omar Polo date: Tue May 22 08:51:24 2018 UTC Updated makefile and readme commit - 9e94fcbe75c5556f90ecc7416376458fdc0845d0 commit + 75faf30e2ae5341a4a9586ebf08cb48e4d5847f2 blob - f72f121ae78676f2aaac111b14488a6d9594e7a3 blob + 88d8f74b08b570b69b3829f2036c68da8df0a745 --- Makefile +++ Makefile @@ -1,17 +1,37 @@ VERSION = 0.1 -CC ?= clang +# you may want to change these OPTIONAL = xinerama xft +CDEFS = -DUSE_XINERAMA -DUSE_XFT -DUSE_STRCASESTR + +# you may not want to change these +CC ?= cc LIBS = `pkg-config --libs x11 ${OPTIONAL}` -CFLAGS = -DUSE_XINERAMA -DUSE_XFT -DVERSION=\"$(VERSION)\" `pkg-config --cflags x11 ${OPTIONAL}` -g -O0 +OPTIM = -O3 +CFLAGS = ${CDEFS} -DVERSION=\"$(VERSION)\" `pkg-config --cflags x11 ${OPTIONAL}` -.PHONY: all clean install +.PHONY: all clean install debug no_xft no_xinerama no_xft_xinerama gnu all: mymenu mymenu: mymenu.c - $(CC) $(CFLAGS) mymenu.c -o mymenu $(LIBS) + $(CC) $(CFLAGS) mymenu.c -o mymenu $(LIBS) ${OPTIM} +gnu: mymenu.c + make CDEFS="-D_GNU_SOURCE ${CDEFS}" + +debug: + make OPTIM="-g -O0 -Wall" + +no_xft: mymenu.c + make OPTIONAL="xinerama" CDEFS="-DUSE_XINERAMA -DUSE_STRCASESTR" + +no_xinerama: mymenu.c + make OPTIONAL="xft" CDEFS="-DUSE_XFT -DUSE_STRCASESTR" + +no_xft_xinerama: mymenu.c + make OPTIONAL="" CDEFS="-DUSE_STRCASESTR" + clean: rm -f mymenu blob - 0a3c9a6bdd4bcee4dba073d4aa34ca28153a6d0f blob + 3239360910543ca963fc99aecce10db1a7343f6e --- README.md +++ README.md @@ -35,11 +35,25 @@ also the [template](Xexample) for the resources. ## Build -As simple as `make`. By default both Xft and Xinerama are enabled, if -you want to disable them just delete the relative `-DUSE_` from the -`CFLAGS` and update the `OPTIONAL` variable. Of course you can delete -both, or just one of them. +As simple as `make` (or `make gnu` if you're using GNU libc). Keep in +mind that, by default, both Xft and Xinerama are enabled. So, you may +want to run: + - `make no_xft` to build without xft support; + - `make no_xinerama` to build without xinerama support; + - `make no_xft_xinerama` to build without xinerama *and* no xft support. + +#### ignore case completion / don't have `strcasestr(3)` + +If you want to build without the ignore case completion or on your +platform `strcasestr(3)` isn't available, you have to update the +`Makefile` and remove `-DUSE_STRCASESTR`. A simple +``` shell +sed -i.orig 's/-DUSE_STRCASESTR//g' Makefile +``` +should be enough. + + ## FAQ - Does not run / Hangs @@ -70,13 +84,18 @@ both, or just one of them. ## TODO + - Improve UTF8 support + + The whole UTF8 support is still kinda naïve and should definitely + be improved. + + - Opacity support + - Command line flags At the moment the X Resource Database is the only way to interact with the graphic appearance of MyMenu. - - Opacity support - ## Scripts I'm using this script to launch MyMenu with custom item @@ -138,7 +157,7 @@ path=`echo $PATH | sed 's/:/ /g'` for i in $path; do ls -F $i | grep '.*\*$' | sed 's/\*//' done -} | sort | /bin/sh -c "$(mymenu "$@")" +} | sort -f | /bin/sh -c "$(mymenu "$@")" ``` Of course you can as well use the `dmenu_path` and `dmenu_run` scripts