summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas McFadzean2017-12-08 14:39:37 +0000
committerDouglas McFadzean2017-12-08 14:39:37 +0000
commitee181beb273d2c1431bbe6cace2725571cc43b90 (patch)
treea028c285ff9973c77271eb0ac3668c955b43ecf7
downloadaur-ee181beb273d2c1431bbe6cace2725571cc43b90.tar.gz
4.7-1
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD41
-rw-r--r--dmenu-geometry-4.7.diff97
3 files changed, 162 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b30a97c77781
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+# Generated by mksrcinfo v8
+# Fri Dec 8 14:37:00 UTC 2017
+pkgbase = dmenu-mouse-geometry
+ pkgdesc = A generic menu for X, with added mouse and geometry support
+ pkgver = 4.7
+ pkgrel = 1
+ url = http://tools.suckless.org/dmenu/
+ arch = x86_64
+ license = MIT
+ depends = sh
+ depends = libxinerama
+ depends = libxft
+ depends = freetype2
+ provides = dmenu
+ conflicts = dmenu
+ source = http://dl.suckless.org/tools/dmenu-4.7.tar.gz
+ source = https://tools.suckless.org/dmenu/patches/dmenu-mousesupport-4.7.diff
+ source = dmenu-geometry-4.7.diff
+ sha256sums = a75635f8dc2cbc280deecb906ad9b7594c5c31620e4a01ba30dc83984881f7b9
+ sha256sums = 084aa281c92bf87103121a031617c3ec10ee63ce40f955aefafc5dbded9489e5
+ sha256sums = c3b3f699893e2bf132185b22419ea00d56e97a99e125e89709416e5e0196bef9
+
+pkgname = dmenu-mouse-geometry
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2c861d6d4f33
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id$
+# Maintainer: ninian <mcfadzean.org.uk ta linux>
+# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
+# Contributor: Thorsten Töpper <atsutane-tu@freethoughts.de>
+# Contributor: Thayer Williams <thayer@archlinux.org>
+# Contributor: Jeff 'codemac' Mickey <jeff@archlinux.org>
+
+pkgname=dmenu-mouse-geometry
+pkgver=4.7
+pkgrel=1
+pkgdesc="A generic menu for X, with added mouse and geometry support"
+url="http://tools.suckless.org/dmenu/"
+arch=('x86_64')
+license=('MIT')
+depends=('sh' 'libxinerama' 'libxft' 'freetype2')
+conflicts=('dmenu')
+provides=('dmenu')
+source=("http://dl.suckless.org/tools/dmenu-$pkgver.tar.gz"
+ "https://tools.suckless.org/dmenu/patches/dmenu-mousesupport-$pkgver.diff"
+ "dmenu-geometry-$pkgver.diff")
+sha256sums=('a75635f8dc2cbc280deecb906ad9b7594c5c31620e4a01ba30dc83984881f7b9'
+ '084aa281c92bf87103121a031617c3ec10ee63ce40f955aefafc5dbded9489e5'
+ 'c3b3f699893e2bf132185b22419ea00d56e97a99e125e89709416e5e0196bef9')
+
+prepare() {
+ cd "$srcdir/dmenu-$pkgver"
+ patch -p1 -i "$srcdir/dmenu-mousesupport-$pkgver.diff"
+ patch -p1 -i "$srcdir/dmenu-geometry-$pkgver.diff"
+}
+
+build() {
+ cd "$srcdir/dmenu-$pkgver"
+ make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11 FREETYPEINC=/usr/include/freetype2
+}
+
+package() {
+ cd "$srcdir/dmenu-$pkgver"
+ make PREFIX=/usr DESTDIR="$pkgdir" install
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
diff --git a/dmenu-geometry-4.7.diff b/dmenu-geometry-4.7.diff
new file mode 100644
index 000000000000..64756ce563c4
--- /dev/null
+++ b/dmenu-geometry-4.7.diff
@@ -0,0 +1,97 @@
+diff -up a/dmenu.1 b/dmenu.1
+--- a/dmenu.1
++++ b/dmenu.1
+@@ -6,6 +6,12 @@ dmenu \- dynamic menu
+ .RB [ \-bfiv ]
+ .RB [ \-l
+ .IR lines ]
++.RB [ \-x
++.IR xoffset ]
++.RB [ \-y
++.IR yoffset ]
++.RB [ \-W
++.IR width ]
+ .RB [ \-m
+ .IR monitor ]
+ .RB [ \-p
+@@ -50,6 +56,18 @@ dmenu matches menu items case insensitiv
+ .BI \-l " lines"
+ dmenu lists items vertically, with the given number of lines.
+ .TP
++.BI \-x " xoffset"
++dmenu is placed at this offset measured from the left side of the monitor.
++Can be negative.
++.TP
++.BI \-y " yoffset"
++dmenu is placed at this offset measured from the top side of the monitor. If the
++.B \-b
++option is used, the offset is measured from the bottom. Can be negative.
++.TP
++.BI \-W " width"
++sets the width of the dmenu window.
++.TP
+ .BI \-m " monitor"
+ dmenu is displayed on the monitor number supplied. Monitor numbers are starting
+ from 0.
+diff -up a/dmenu.c b/dmenu.c
+--- a/dmenu.c
++++ b/dmenu.c
+@@ -36,6 +36,9 @@ struct item {
+ static char text[BUFSIZ] = "";
+ static char *embed;
+ static int bh, mw, mh;
++static int dmx = 0; /* put dmenu at this x offset */
++static int dmy = 0; /* put dmenu at this y offset (measured from the bottom if topbar is 0) */
++static unsigned int dmw = 0; /* make dmenu this wide */
+ static int inputw = 0, promptw;
+ static int lrpad; /* sum of left and right padding */
+ static size_t cursor;
+@@ -704,9 +707,9 @@ setup(void)
+ if (INTERSECT(x, y, 1, 1, info[i]))
+ break;
+
+- x = info[i].x_org;
+- y = info[i].y_org + (topbar ? 0 : info[i].height - mh);
+- mw = info[i].width;
++ x = info[i].x_org + dmx;
++ y = info[i].y_org + (topbar ? dmy : info[i].height - mh - dmy);
++ mw = (dmw>0 ? dmw : info[i].width);
+ XFree(info);
+ } else
+ #endif
+@@ -714,9 +717,9 @@ setup(void)
+ if (!XGetWindowAttributes(dpy, parentwin, &wa))
+ die("could not get embedding window attributes: 0x%lx",
+ parentwin);
+- x = 0;
+- y = topbar ? 0 : wa.height - mh;
+- mw = wa.width;
++ x = dmx;
++ y = topbar ? dmy : wa.height - mh - dmy;
++ mw = (dmw>0 ? dmw : wa.width);
+ }
+ promptw = (prompt && *prompt) ? TEXTW(prompt) - lrpad / 4 : 0;
+ inputw = MIN(inputw, mw/3);
+@@ -753,7 +756,8 @@ setup(void)
+ static void
+ usage(void)
+ {
+- fputs("usage: dmenu [-bfiv] [-l lines] [-p prompt] [-fn font] [-m monitor]\n"
++ fputs("usage: dmenu [-bfiv] [-l lines] [-x xoffset] [-y yoffset] [-W width]\n"
++ " [-p prompt] [-fn font] [-m monitor]\n"
+ " [-nb color] [-nf color] [-sb color] [-sf color] [-w windowid]\n", stderr);
+ exit(1);
+ }
+@@ -781,6 +785,12 @@ main(int argc, char *argv[])
+ /* these options take one argument */
+ else if (!strcmp(argv[i], "-l")) /* number of lines in vertical list */
+ lines = atoi(argv[++i]);
++ else if (!strcmp(argv[i], "-x")) /* window x offset */
++ dmx = atoi(argv[++i]);
++ else if (!strcmp(argv[i], "-y")) /* window y offset (from bottom up if -b) */
++ dmy = atoi(argv[++i]);
++ else if (!strcmp(argv[i], "-W")) /* make dmenu this wide */
++ dmw = atoi(argv[++i]);
+ else if (!strcmp(argv[i], "-m"))
+ mon = atoi(argv[++i]);
+ else if (!strcmp(argv[i], "-p")) /* adds prompt to left of input field */