From 2bac5599b3e7629875d692b65a336915ecfee49d Mon Sep 17 00:00:00 2001 From: "Anselm R. Garbe" Date: Thu, 8 Feb 2007 11:10:29 +0100 Subject: letting dmenu appear at the bottom by default --- dmenu.1 | 4 ---- main.c | 10 +++------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/dmenu.1 b/dmenu.1 index c682711..88dd9ef 100644 --- a/dmenu.1 +++ b/dmenu.1 @@ -3,7 +3,6 @@ dmenu \- dynamic menu .SH SYNOPSIS .B dmenu -.RB [ \-b ] .RB [ \-fn " "] .RB [ \-nb " "] .RB [ \-nf " "] @@ -20,9 +19,6 @@ It manages huge amounts (up to 10.000 and more) of user defined menu items efficiently. .SS Options .TP -.B \-b -makes dmenu appear at the screen bottom (by default it appears at the screen top). -.TP .B \-fn defines the font. .TP diff --git a/main.c b/main.c index f1f71fd..224d298 100644 --- a/main.c +++ b/main.c @@ -342,7 +342,6 @@ DC dc = {0}; int main(int argc, char *argv[]) { - Bool bottom = False; char *font = FONT; char *maxname; char *normbg = NORMBGCOLOR; @@ -361,10 +360,7 @@ main(int argc, char *argv[]) { timeout.tv_sec = 3; /* command line args */ for(i = 1; i < argc; i++) - if(!strncmp(argv[i], "-b", 3)) { - bottom = True; - } - else if(!strncmp(argv[i], "-fn", 4)) { + if(!strncmp(argv[i], "-fn", 4)) { if(++i < argc) font = argv[i]; } else if(!strncmp(argv[i], "-nb", 4)) { @@ -390,7 +386,7 @@ main(int argc, char *argv[]) { exit(EXIT_SUCCESS); } else - eprint("usage: dmenu [-b] [-fn ] [-nb ] [-nf ] [-p ]\n" + eprint("usage: dmenu [-fn ] [-nb ] [-nf ] [-p ]\n" " [-sb ] [-sf ] [-t ] [-v]\n", stdout); setlocale(LC_CTYPE, ""); dpy = XOpenDisplay(0); @@ -434,7 +430,7 @@ main(int argc, char *argv[]) { mw = DisplayWidth(dpy, screen); mh = dc.font.height + 2; win = XCreateWindow(dpy, root, 0, - bottom ? DisplayHeight(dpy, screen) - mh : 0, mw, mh, 0, + DisplayHeight(dpy, screen) - mh, mw, mh, 0, DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen), CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa); -- cgit v1.2.3-13-gbd6f