[dev] [dmenu] What is the status of the project?

10 views
Skip to first unread message

Alexander Sedov

unread,
Apr 14, 2013, 6:42:48 PM4/14/13
to dev mail list
As per subject. It seems that last maintainer commit was an year ago,
and patches sent to mailing list are left unresponded. In case this
project has been orphaned, may I take over it? There is popular demand
for being able to statically configure dmenu (e.g. to have config.h),
security bug discovered by me, and mouse support patch by hiltjo,
which is small and convenient. I think that the situation should be
addressed.

Anselm R Garbe

unread,
Apr 15, 2013, 3:29:51 AM4/15/13
to dev mail list
Hi,
 
I'm the current maintainer of dmenu.

I intend to get dmenu and dwm back on track during the next days. So feel free to compile me a mail with all the patches you want to see in mainline dmenu.

It is already on the agenda to reinstate the old config.h approach, not sure why it was removed.

Having said this, I'm happy to grow suckless.org and to hand off dmenu to a trustworthy new maintainer, however I do request more contributions first.

Best regards,
Anselm

Alexander Sedov

unread,
Apr 15, 2013, 3:39:53 AM4/15/13
to dev mail list
2013/4/15 Anselm R Garbe <gar...@gmail.com>:
> Hi,
>
> I'm the current maintainer of dmenu.
>
> I intend to get dmenu and dwm back on track during the next days. So feel
> free to compile me a mail with all the patches you want to see in mainline
> dmenu.
Glad to hear this! Is it fine if I send you links to mailing archives?

Anselm R Garbe

unread,
Apr 15, 2013, 3:43:45 AM4/15/13
to dev mail list
On 15 April 2013 09:39, Alexander Sedov <alex0...@gmail.com> wrote:
> 2013/4/15 Anselm R Garbe <gar...@gmail.com>:
> > I'm the current maintainer of dmenu.
> >
> > I intend to get dmenu and dwm back on track during the next days. So feel
> > free to compile me a mail with all the patches you want to see in mainline
> > dmenu.
> Glad to hear this! Is it fine if I send you links to mailing archives?

Sure, looking forward.

Best regards,
Anselm

Alexander Sedov

unread,
Apr 15, 2013, 4:08:37 AM4/15/13
to dev mail list
I went through the mailing list archives since the date of last commit
and collected all patches that seem relevant/interesting to me. Sorry
if you have already seen some of these.
http://lists.suckless.org/dev/1108/9114.html
http://lists.suckless.org/dev/1110/9742.html
http://lists.suckless.org/dev/1303/14982.html
http://lists.suckless.org/dev/1304/15300.html

Robert Figura

unread,
Apr 15, 2013, 8:20:02 AM4/15/13
to d...@suckless.org
> > 2013/4/15 Anselm R Garbe <gar...@gmail.com>:
> > > I'm the current maintainer of dmenu.
> > >
> > > I intend to get dmenu and dwm back on track during the next days. So feel
> > > free to compile me a mail with all the patches you want to see in mainline
> > > dmenu.

I'd love to see this one in mainline, despite it's title:

http://tools.suckless.org/dmenu/patches/xmms-like_pattern_matching

Sadly the wiki has no link to a current version:

http://tools.suckless.org/dmenu/patches/dmenu-4.4-tok.diff

I might be inclined to try porting it myself sooner than later, if there
is any chance it will be included. But i'd like to know because im a
little tight on time.

Kind Regards
- Robert Figura


Alexander Sedov

unread,
Apr 15, 2013, 8:48:52 AM4/15/13
to dev mail list
> I'd love to see this one in mainline, despite it's title:
>
> http://tools.suckless.org/dmenu/patches/xmms-like_pattern_matching
>
> Sadly the wiki has no link to a current version:
>
> http://tools.suckless.org/dmenu/patches/dmenu-4.4-tok.diff
>
> I might be inclined to try porting it myself sooner than later, if there
> is any chance it will be included. But i'd like to know because im a
> little tight on time.
Isn't multi-matching like this a default behaviour now?

Robert Figura

unread,
Apr 15, 2013, 2:14:49 PM4/15/13
to d...@suckless.org
Sure looks like it. Phew that was fast :)

Thanks for the hint
- Robert Figura

--
http://teslawm.org/


Hiltjo Posthuma

unread,
Apr 17, 2013, 11:47:46 AM4/17/13
to dev mail list
Hehe, just to clarify: the patch I submitted which adds mouse support
is not meant to be included in the upstream dmenu, because I think
most people won't like it. However you're free to do whatever you want
with it.

Kind regards,
Hiltjo

Martti Kühne

unread,
Apr 17, 2013, 12:02:21 PM4/17/13
to dev mail list
On Wed, Apr 17, 2013 at 5:47 PM, Hiltjo Posthuma <hil...@codemadness.org> wrote:
>
> Hehe, just to clarify: the patch I submitted which adds mouse support
> is not meant to be included in the upstream dmenu, because I think
> most people won't like it. However you're free to do whatever you want
> with it.
>


If you want it available for the public on suckless.org, commit to the
wiki... [0]

cheers!
mar77i

[0] http://suckless.org/wiki

Alexander Sedov

unread,
Apr 17, 2013, 12:04:25 PM4/17/13
to dev mail list
2013/4/17 Hiltjo Posthuma <hil...@codemadness.org>:
> Hehe, just to clarify: the patch I submitted which adds mouse support
> is not meant to be included in the upstream dmenu, because I think
> most people won't like it. However you're free to do whatever you want
> with it.
That's rather surprising, as I found it small and useful. (Especially
the scroll feature). As Martti said, if you don't want a patch to be
in upstream, you can commit to the wiki.

Hiltjo Posthuma

unread,
Apr 17, 2013, 1:18:56 PM4/17/13
to dev mail list
I'm glad you find it useful! Sorry for my bad wording. I don't mind if
it's being included upstream. My thought was just that there are
people who wouldn't need it. Although I don't have the time to
maintain this patch for each version I have pushed the patch to the
wiki.

Kind regards and thanks!
Hiltjo

Anselm R Garbe

unread,
Apr 17, 2013, 3:04:27 PM4/17/13
to dev mail list
On 15 April 2013 10:08, Alexander Sedov <alex0...@gmail.com> wrote:
> I went through the mailing list archives since the date of last commit
> and collected all patches that seem relevant/interesting to me. Sorry
> if you have already seen some of these.
> http://lists.suckless.org/dev/1108/9114.html

This seems to be wmii related, so no apply.

> http://lists.suckless.org/dev/1110/9742.html

Ok, applied.

> http://lists.suckless.org/dev/1303/14982.html

Ok applied.

> http://lists.suckless.org/dev/1304/15300.html

Ok, applied, but in a slightly amended version.

Best regards,
Anselm

PS: there is still far too much clunk in the dmenu code right now.

Anselm R Garbe

unread,
Apr 17, 2013, 3:06:13 PM4/17/13
to dev mail list
I'm considering adding it, but I will collect some more opinions first.

Best regards,
Anselm

William Giokas

unread,
Apr 17, 2013, 3:14:19 PM4/17/13
to dev mail list
On Wed, Apr 17, 2013 at 09:04:27PM +0200, Anselm R Garbe wrote:
> On 15 April 2013 10:08, Alexander Sedov <alex0...@gmail.com> wrote:
> > I went through the mailing list archives since the date of last commit
> > and collected all patches that seem relevant/interesting to me. Sorry
> > if you have already seen some of these.
> > http://lists.suckless.org/dev/1108/9114.html
>
> This seems to be wmii related, so no apply.
>
> > http://lists.suckless.org/dev/1110/9742.html
>
> Ok, applied.
>
> > http://lists.suckless.org/dev/1303/14982.html
>
> Ok applied.
>
> > http://lists.suckless.org/dev/1304/15300.html
>
> Ok, applied, but in a slightly amended version.

You forgot to add the config.def.h to git.

--
William Giokas | KaiSforza
GnuPG Key: 0x73CD09CF
Fingerprint: F73F 50EF BBE2 9846 8306 E6B8 6902 06D8 73CD 09CF

Anselm R Garbe

unread,
Apr 17, 2013, 3:16:52 PM4/17/13
to dev mail list
On 17 April 2013 21:14, William Giokas <100...@gmail.com> wrote:
> On Wed, Apr 17, 2013 at 09:04:27PM +0200, Anselm R Garbe wrote:
>> On 15 April 2013 10:08, Alexander Sedov <alex0...@gmail.com> wrote:
>> > I went through the mailing list archives since the date of last commit
>> > and collected all patches that seem relevant/interesting to me. Sorry
>> > if you have already seen some of these.
>> > http://lists.suckless.org/dev/1108/9114.html
>>
>> This seems to be wmii related, so no apply.
>>
>> > http://lists.suckless.org/dev/1110/9742.html
>>
>> Ok, applied.
>>
>> > http://lists.suckless.org/dev/1303/14982.html
>>
>> Ok applied.
>>
>> > http://lists.suckless.org/dev/1304/15300.html
>>
>> Ok, applied, but in a slightly amended version.
>
> You forgot to add the config.def.h to git.

Right, fixed.

Thanks,
Anselm

Jente Hidskes

unread,
Apr 17, 2013, 3:25:22 PM4/17/13
to dev mail list
I see you are open for patches now. Have you heard of the xyw offsets patch? It allows to you, for example, have dmenu spawn in the center of the screen at coördinates x and y, and width w. Note that the patch is not mine, I don't know where I picked it up. I just made it apply to dmenu 4.5

--- a/dmenu.1 2012-01-08 13:18:43.000000000 +0100
+++ b/dmenu.1 2012-12-12 22:54:01.622487570 +0100
@@ -55,6 +55,15 @@
.BI \-fn " font"
defines the font or font set used.
.TP
+.BI \-x " xoffset"
+defines the offset from the left border of the screen.
+.TP
+.BI \-y " yoffset"
+defines the offset from the top border of the screen.
+.TP
+.BI \-w " width"
+defines the desired menu window width.
+.TP
.BI \-nb " color"
defines the normal background color.
.IR #RGB ,
--- a/dmenu.c 2012-12-12 22:58:55.475859117 +0100
+++ b/dmenu.c 2012-12-12 23:02:21.569227230 +0100
@@ -44,6 +44,9 @@
static char text[BUFSIZ] = "";
static int bh, mw, mh;
static int inputw, promptw;
+static int xoffset = 0;
+static int yoffset = 0;
+static int width = 0;
static size_t cursor = 0;
static const char *font = NULL;
static const char *prompt = NULL;
@@ -90,6 +93,12 @@
else if(i+1 == argc)
usage();
/* these options take one argument */
+ else if(!strcmp(argv[i], "-x")) /* offset from the left border of the screen */
+ xoffset = atoi(argv[++i]);
+ else if(!strcmp(argv[i], "-y")) /* offset from the top border of the screen */
+ yoffset = atoi(argv[++i]);
+ else if(!strcmp(argv[i], "-w")) /* defines the desired menu window width */
+ width = atoi(argv[++i]);
else if(!strcmp(argv[i], "-l")) /* number of lines in vertical list */
lines = atoi(argv[++i]);
else if(!strcmp(argv[i], "-p")) /* adds prompt to left of input field */
@@ -578,7 +587,7 @@
break;

x = info[i].x_org;
- y = info[i].y_org + (topbar ? 0 : info[i].height - mh);
+ y = info[i].y_org + (topbar ? yoffset : info[i].height - mh - yoffset);
mw = info[i].width;
XFree(info);
}
@@ -586,9 +595,13 @@
#endif
{
x = 0;
- y = topbar ? 0 : DisplayHeight(dc->dpy, screen) - mh;
+ y = topbar ? yoffset : DisplayHeight(dc->dpy, screen) - mh - yoffset;
mw = DisplayWidth(dc->dpy, screen);
}
+
+ x += xoffset;
+ mw = width ? width : mw;
+
promptw = prompt ? textw(dc, prompt) : 0;
inputw = MIN(inputw, mw/3);
match();
@@ -615,6 +628,7 @@
void
usage(void) {
fputs("usage: dmenu [-b] [-f] [-i] [-l lines] [-p prompt] [-fn font]\n"
+ " [-x xoffset] [-y yoffset] [-w width]\n"
" [-nb color] [-nf color] [-sb color] [-sf color] [-v]\n", stderr);
exit(EXIT_FAILURE);
}

----------------------------------------
> Date: Wed, 17 Apr 2013 21:16:52 +0200
> Subject: Re: [dev] [dmenu] What is the status of the project?
> From: gar...@gmail.com
> To: d...@suckless.org

Alexander Sedov

unread,
Apr 17, 2013, 4:42:02 PM4/17/13
to dev mail list
2013/4/17 Jente Hidskes <jthi...@outlook.com>:
> I see you are open for patches now. Have you heard of the xyw offsets patch? It allows to you, for example, have dmenu spawn in the center of the screen at coördinates x and y, and width w. Note that the patch is not mine, I don't know where I picked it up. I just made it apply to dmenu 4.5
That's what I meant to send instead of wmii patch. Sorry, must've
pressed ^Y over wrong link.

Troels Henriksen

unread,
Apr 18, 2013, 3:45:44 AM4/18/13
to dev mail list
To me, this sounds exactly like the kind of feature you want in a
seperate patch. It's a rather big amount of code (relative to suckless
standards anyway), and completely unnecessary if you don't like using
the rat. Furthermore, while some dmenu-patches add command line
toggles, that might be used by other programs that use dmenu as a tool,
this feature is completely orthogonal to such compositional use of
dmenu, and thus not as important to dmenu's usefulness as a building
block for other programs.

--
\ Troels
/\ Henriksen

Fernando C.V.

unread,
Apr 19, 2013, 1:14:25 PM4/19/13
to dev mail list
A feature that would be a nice improvement would be to extend the behaviour of the -f flag to not only grab the keyboard but also draw the window already and start adding entries to the menu as they are received from stdin.

That way, we bring dmenu to the user at the instand t=0, even while a extremely long list of items that would take long to reach EOF is sent to dmenu (sometimes this happens for my dmenu_run script, which cats a history file in addition to the list of executables).

I believe there was some mail at some point from someone that was trying to do something like this, but I'm not sure how far did it went.

--
Fernando

Anselm R Garbe

unread,
Apr 27, 2013, 2:42:19 PM4/27/13
to dev mail list
On 18 April 2013 09:45, Troels Henriksen <at...@sigkill.dk> wrote:
> To me, this sounds exactly like the kind of feature you want in a
> seperate patch. It's a rather big amount of code (relative to suckless
> standards anyway), and completely unnecessary if you don't like using
> the rat. Furthermore, while some dmenu-patches add command line
> toggles, that might be used by other programs that use dmenu as a tool,
> this feature is completely orthogonal to such compositional use of
> dmenu, and thus not as important to dmenu's usefulness as a building
> block for other programs.

I agree, thanks.

Best regards,
Anselm

Anselm R Garbe

unread,
Apr 27, 2013, 2:44:59 PM4/27/13
to dev mail list, fer...@gmail.com
I'd be curious about the status of such an effort. Back in the early
dmenu days we attempted such stuff, but it led to bloat, thus the idea
was abandoned.

Best regards,
Anselm

Reply all
Reply to author
Forward
0 new messages