summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormilaq2019-02-05 00:04:27 +0100
committermilaq2019-02-05 00:04:27 +0100
commit460c235932f491714885214c4297d9c27157af53 (patch)
tree43fffa1aefc9fe7c0f827443f3da7b5c918442bb
parent1d9a46fa4bab38b343488f33f3933475a57969ee (diff)
downloadaur-460c235932f491714885214c4297d9c27157af53.tar.gz
bump to upstream version 4.9
and include modified lineheight patch in repo
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD12
-rw-r--r--dmenu-lineheight.diff76
3 files changed, 88 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 84f57ff938f1..8430607f1ef8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = dmenu-height
pkgdesc = Generic menu for X, with added height setting
- pkgver = 4.8
- pkgrel = 2
+ pkgver = 4.9
+ pkgrel = 1
url = http://tools.suckless.org/dmenu/
arch = x86_64
license = MIT
@@ -11,10 +11,10 @@ pkgbase = dmenu-height
depends = freetype2
provides = dmenu
conflicts = dmenu
- source = https://dl.suckless.org/tools/dmenu-4.8.tar.gz
- source = https://tools.suckless.org/dmenu/patches/line-height/dmenu-lineheight-4.7.diff
- sha256sums = fe615a5c3607061e2106700862e82ac62a9fa1e6a7ac3d616a9c76106476db61
- sha256sums = 779de570f7a0e81c23e522a68aed21c50830b8f39982a7f4af022324c65e1f67
+ source = https://dl.suckless.org/tools/dmenu-4.9.tar.gz
+ source = dmenu-lineheight.diff
+ sha256sums = b3971f4f354476a37b2afb498693649009b201550b0c7c88e866af8132b64945
+ sha256sums = 724fcbe8f3c6e4392d3b6a0a4fa6e34c0a3641745e296eed902e561926529d97
pkgname = dmenu-height
diff --git a/PKGBUILD b/PKGBUILD
index 3b9f792be66f..c6110b3aa872 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,8 @@
# vim:ts=4:sw=4:expandtab
# Maintainer: milaq <micha.laqua@gmail.com>
pkgname=dmenu-height
-pkgver=4.8
-pkgrel=2
+pkgver=4.9
+pkgrel=1
pkgdesc="Generic menu for X, with added height setting"
arch=('x86_64')
url="http://tools.suckless.org/dmenu/"
@@ -11,12 +11,12 @@ provides=('dmenu')
depends=('sh' 'libxinerama' 'libxft' 'freetype2')
conflicts=('dmenu')
source=("https://dl.suckless.org/tools/dmenu-$pkgver.tar.gz"
- "https://tools.suckless.org/dmenu/patches/line-height/dmenu-lineheight-4.7.diff")
-sha256sums=('fe615a5c3607061e2106700862e82ac62a9fa1e6a7ac3d616a9c76106476db61'
- '779de570f7a0e81c23e522a68aed21c50830b8f39982a7f4af022324c65e1f67')
+ "dmenu-lineheight.diff")
+sha256sums=('b3971f4f354476a37b2afb498693649009b201550b0c7c88e866af8132b64945'
+ '724fcbe8f3c6e4392d3b6a0a4fa6e34c0a3641745e296eed902e561926529d97')
prepare() {
cd "$srcdir/dmenu-$pkgver"
- patch -p1 -i "$srcdir/dmenu-lineheight-4.7.diff"
+ patch -p1 -i "$srcdir/dmenu-lineheight.diff"
}
build() {
diff --git a/dmenu-lineheight.diff b/dmenu-lineheight.diff
new file mode 100644
index 000000000000..0941c0eba8c5
--- /dev/null
+++ b/dmenu-lineheight.diff
@@ -0,0 +1,76 @@
+diff --git a/config.def.h b/config.def.h
+index a9122f7..6d936b7 100644
+--- a/config.def.h
++++ b/config.def.h
+@@ -16,4 +16,5 @@
+ /* -l option; if nonzero, dmenu uses vertical list with given number of lines */
+ static unsigned int lines = 0;
++static unsigned int lineheight = 0; /* -h option; minimum height of a menu line */
+
+ /*
+diff --git a/dmenu.1 b/dmenu.1
+index d3ab805..9fe4434 100644
+--- a/dmenu.1
++++ b/dmenu.1
+@@ -50,6 +50,9 @@ dmenu matches menu items case insensitively.
+ .BI \-l " lines"
+ dmenu lists items vertically, with the given number of lines.
+ .TP
++.BI \-h " height"
++dmenu uses a menu line of at least 'height' pixels tall, but no less than 8.
++.TP
+ .BI \-m " monitor"
+ dmenu is displayed on the monitor number supplied. Monitor numbers are starting
+ from 0.
+diff --git a/dmenu.c b/dmenu.c
+index a07f8e3..25832a7 100644
+--- a/dmenu.c
++++ b/dmenu.c
+@@ -130,7 +130,7 @@ drawmenu(void)
+ {
+ unsigned int curpos;
+ struct item *item;
+- int x = 0, y = 0, w;
++ int x = 0, y = 0, fh = drw->fonts->h, w;
+
+ drw_setscheme(drw, scheme[SchemeNorm]);
+ drw_rect(drw, 0, 0, mw, mh, 1, 1);
+@@ -146,9 +146,9 @@ drawmenu(void)
+ drw_text(drw, x, 0, w, bh, lrpad / 2, text, 0);
+
+ curpos = TEXTW(text) - TEXTW(&text[cursor]);
+ if ((curpos += lrpad / 2 - 1) < w) {
+ drw_setscheme(drw, scheme[SchemeNorm]);
+- drw_rect(drw, x + curpos, 2, 2, bh - 4, 1, 0);
++ drw_rect(drw, x + curpos, 2 + (bh-fh)/2, 2, fh - 4, 1, 0);
+ }
+
+ if (lines > 0) {
+@@ -676,7 +676,8 @@ setup(void)
+ utf8 = XInternAtom(dpy, "UTF8_STRING", False);
+
+ /* calculate menu geometry */
+ bh = drw->fonts->h + 2;
++ bh = MAX(bh,lineheight); /* make a menu line AT LEAST 'lineheight' tall */
+ lines = MAX(lines, 0);
+ mh = (lines + 1) * bh;
+ #ifdef XINERAMA
+@@ -754,6 +755,7 @@ setup(void)
+ usage(void)
+ {
+ fputs("usage: dmenu [-bfiv] [-l lines] [-p prompt] [-fn font] [-m monitor]\n"
++ " [-h height]\n"
+ " [-nb color] [-nf color] [-sb color] [-sf color] [-w windowid]\n", stderr);
+ exit(1);
+ }
+@@ -787,6 +789,10 @@ main(int argc, char *argv[])
+ prompt = argv[++i];
+ else if (!strcmp(argv[i], "-fn")) /* font or font set */
+ fonts[0] = argv[++i];
++ else if(!strcmp(argv[i], "-h")) { /* minimum height of one menu line */
++ lineheight = atoi(argv[++i]);
++ lineheight = MAX(lineheight,8); /* reasonable default in case of value too small/negative */
++ }
+ else if (!strcmp(argv[i], "-nb")) /* normal background color */
+ normbgcolor = argv[++i];
+ else if (!strcmp(argv[i], "-nf")) /* normal foreground color */