diff --git a/PKGBUILD b/PKGBUILD index a44e098..f53d257 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -13,14 +13,28 @@ url='https://tools.suckless.org/dmenu/' arch=('x86_64') license=('MIT') depends=('sh' 'libxinerama' 'libxft' 'freetype2') -source=(https://dl.suckless.org/tools/dmenu-${pkgver}.tar.gz) -sha512sums=('c2779209fe012de8ca1cdd72923da6d594f4a8368c85c3c0e0afd4ae489a95fe0e6f05a947d115b6b389aa7170ab14c2c645a2031353b0a08f38327ab461fe65') + +sha512sums=('c2779209fe012de8ca1cdd72923da6d594f4a8368c85c3c0e0afd4ae489a95fe0e6f05a947d115b6b389aa7170ab14c2c645a2031353b0a08f38327ab461fe65' + 'c06677bb73955f4aaf73bd9556d6ae016c27157913b3695a324453a9fe00ca720a2d3de67c9bbd3cde9440d372ab3df62680faa08fe82f8a9f1f77fc1f88b474') + +_patches=() + +source=(https://dl.suckless.org/tools/dmenu-${pkgver}.tar.gz + config.h + "${_patches[@]}") prepare() { cd ${pkgname}-${pkgver} echo "CPPFLAGS+=${CPPFLAGS}" >> config.mk echo "CFLAGS+=${CFLAGS}" >> config.mk echo "LDFLAGS+=${LDFLAGS}" >> config.mk + + for patch in "${_patches[@]}"; do + echo "Applying patch $(basename $patch)..." + patch -Np1 -i "$srcdir/$(basename $patch)" + done + + cp $srcdir/config.h config.h } build() { diff --git a/config.h b/config.h new file mode 100644 index 0000000..1edb647 --- /dev/null +++ b/config.h @@ -0,0 +1,23 @@ +/* See LICENSE file for copyright and license details. */ +/* Default settings; can be overriden by command line. */ + +static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ +/* -fn option overrides fonts[0]; default X11 font or font set */ +static const char *fonts[] = { + "monospace:size=10" +}; +static const char *prompt = NULL; /* -p option; prompt to the left of input field */ +static const char *colors[SchemeLast][2] = { + /* fg bg */ + [SchemeNorm] = { "#bbbbbb", "#222222" }, + [SchemeSel] = { "#eeeeee", "#005577" }, + [SchemeOut] = { "#000000", "#00ffff" }, +}; +/* -l option; if nonzero, dmenu uses vertical list with given number of lines */ +static unsigned int lines = 0; + +/* + * Characters not considered part of a word while deleting words + * for example: " /?\"&[]" + */ +static const char worddelimiters[] = " ";