1
0
mirror of https://github.com/alrayyes/dmenu synced 2023-11-14 15:56:27 +00:00

added patch functionality

This commit is contained in:
Ryan Kes 2019-03-18 15:30:39 +01:00
parent 5083f7ac8a
commit 9ecc7b995b
2 changed files with 39 additions and 2 deletions

View File

@ -13,14 +13,28 @@ url='https://tools.suckless.org/dmenu/'
arch=('x86_64') arch=('x86_64')
license=('MIT') license=('MIT')
depends=('sh' 'libxinerama' 'libxft' 'freetype2') 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() { prepare() {
cd ${pkgname}-${pkgver} cd ${pkgname}-${pkgver}
echo "CPPFLAGS+=${CPPFLAGS}" >> config.mk echo "CPPFLAGS+=${CPPFLAGS}" >> config.mk
echo "CFLAGS+=${CFLAGS}" >> config.mk echo "CFLAGS+=${CFLAGS}" >> config.mk
echo "LDFLAGS+=${LDFLAGS}" >> 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() { build() {

23
config.h Normal file
View File

@ -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[] = " ";