commit 380a1d64200d80b05bdc5c159f0923f904e89fa6
Author: Alex Cole <[email protected]>
Date:   Tue Oct 6 10:53:36 2020 +1300

    Minor changes

diff --git a/tools.suckless.org/dmenu/patches/xyw/dmenu-xyw-5.0.diff 
b/tools.suckless.org/dmenu/patches/xyw/dmenu-xyw-5.0.diff
index 1925835f..ddf9cfb5 100644
--- a/tools.suckless.org/dmenu/patches/xyw/dmenu-xyw-5.0.diff
+++ b/tools.suckless.org/dmenu/patches/xyw/dmenu-xyw-5.0.diff
@@ -1,10 +1,33 @@
+From 7dc7cb96cdda9ad66e33109223c4cc297a7721d1 Mon Sep 17 00:00:00 2001
+From: Alex Cole <[email protected]>
+Date: Tue, 6 Oct 2020 10:42:07 +1300
+Subject: [PATCH] Updated xyw for 5.0 properly
+
+---
+ dmenu.1 | 24 ++++++++++++++++++++++++
+ dmenu.c | 22 ++++++++++++++++------
+ 2 files changed, 40 insertions(+), 6 deletions(-)
+
 diff --git a/dmenu.1 b/dmenu.1
-index d3ab805..5301910 100644
+index 323f93c..a4ecbbb 100644
 --- a/dmenu.1
 +++ b/dmenu.1
-@@ -53,6 +53,24 @@ dmenu matches menu items case insensitively.
- .BI \-h " height"
- dmenu uses a menu line of at least 'height' pixels tall, but no less than 8.
+@@ -8,6 +8,12 @@ dmenu \- dynamic menu
+ .IR lines ]
+ .RB [ \-m
+ .IR monitor ]
++.RB [ \-x
++.IR xoffset ]
++.RB [ \-y
++.IR yoffset ]
++.RB [ \-z
++.IR width ]
+ .RB [ \-p
+ .IR prompt ]
+ .RB [ \-fn
+@@ -54,6 +60,24 @@ dmenu lists items vertically, with the given number of 
lines.
+ dmenu is displayed on the monitor number supplied. Monitor numbers are 
starting
+ from 0.
  .TP
 +.BI \-x " xoffset"
 +dmenu is placed at this offset measured from the left side of the monitor.
@@ -24,14 +47,14 @@ index d3ab805..5301910 100644
 +.BI \-z " 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.
+ .BI \-p " prompt"
+ defines the prompt to be displayed to the left of the input field.
+ .TP
 diff --git a/dmenu.c b/dmenu.c
-index a07f8e3..9e0c51c 100644
+index 65f25ce..7be19ae 100644
 --- a/dmenu.c
 +++ b/dmenu.c
-@@ -36,6 +36,9 @@ struct item {
+@@ -37,6 +37,9 @@ struct item {
  static char text[BUFSIZ] = "";
  static char *embed;
  static int bh, mw, mh;
@@ -41,7 +64,7 @@ index a07f8e3..9e0c51c 100644
  static int inputw = 0, promptw;
  static int lrpad; /* sum of left and right padding */
  static size_t cursor;
-@@ -705,19 +708,19 @@ setup(void)
+@@ -637,9 +640,9 @@ setup(void)
                                if (INTERSECT(x, y, 1, 1, info[i]))
                                        break;
  
@@ -54,7 +77,7 @@ index a07f8e3..9e0c51c 100644
                XFree(info);
        } else
  #endif
-       {
+@@ -647,9 +650,9 @@ setup(void)
                if (!XGetWindowAttributes(dpy, parentwin, &wa))
                        die("could not get embedding window attributes: 0x%lx",
                            parentwin);
@@ -65,18 +88,17 @@ index a07f8e3..9e0c51c 100644
 +              y = topbar ? dmy : wa.height - mh - dmy;
 +              mw = (dmw>0 ? dmw : wa.width);
        }
-       promptw = (prompt && *prompt) ? TEXTW(prompt) : 0;
+       promptw = (prompt && *prompt) ? TEXTW(prompt) - lrpad / 4 : 0;
        inputw = MIN(inputw, mw/3);
-@@ -755,7 +758,7 @@ static void
+@@ -690,6 +693,7 @@ static void
  usage(void)
  {
        fputs("usage: dmenu [-bfiv] [-l lines] [-p prompt] [-fn font] [-m 
monitor]
"
--            "             [-h height]
"
-+            "             [-h height] [-x xoffset] [-y yoffset] [-z width]
"
++            "             [-x xoffset] [-y yoffset] [-z width]
"
              "             [-nb color] [-nf color] [-sb color] [-sf color] [-w 
windowid]
", stderr);
        exit(1);
  }
-@@ -783,6 +786,12 @@ main(int argc, char *argv[])
+@@ -717,6 +721,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]);
@@ -89,3 +111,6 @@ index a07f8e3..9e0c51c 100644
                else if (!strcmp(argv[i], "-m"))
                        mon = atoi(argv[++i]);
                else if (!strcmp(argv[i], "-p"))   /* adds prompt to left of 
input field */
+-- 
+2.28.0
+
diff --git a/tools.suckless.org/dmenu/patches/xyw/index.md 
b/tools.suckless.org/dmenu/patches/xyw/index.md
index 2fcbb33b..3221a1f0 100644
--- a/tools.suckless.org/dmenu/patches/xyw/index.md
+++ b/tools.suckless.org/dmenu/patches/xyw/index.md
@@ -9,7 +9,7 @@ The patch adds options for setting window position and width.
 * The '-w' option sets the window width
 
 Please note that for the 5.0 version, the width parameter is '-z' to avoid 
conflict with '-w windowid'.
-If this change is not desired, the 4.7 version applies perfectly, but '-w 
windowid' will not work.
+If this change is not desired, the 4.7 version applies fine, but '-w windowid' 
will not work.
 
 Download
 --------


Reply via email to