[wiki] [sites] Minor changes || Alex Cole
commit 380a1d64200d80b05bdc5c159f0923f904e89fa6
Author: Alex Cole <ajzcole_AT_airmail.cc>
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
_AT_@ -1,10 +1,33 @@
+From 7dc7cb96cdda9ad66e33109223c4cc297a7721d1 Mon Sep 17 00:00:00 2001
+From: Alex Cole <ajzcole_AT_airmail.cc>
+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
-_AT_@ -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.
+_AT_@ -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
+_AT_@ -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.
_AT_@ -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
-_AT_@ -36,6 +36,9 @@ struct item {
+_AT_@ -37,6 +37,9 @@ struct item {
static char text[BUFSIZ] = "";
static char *embed;
static int bh, mw, mh;
_AT_@ -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;
-_AT_@ -705,19 +708,19 @@ setup(void)
+_AT_@ -637,9 +640,9 @@ setup(void)
if (INTERSECT(x, y, 1, 1, info[i]))
break;
_AT_@ -54,7 +77,7 @@ index a07f8e3..9e0c51c 100644
XFree(info);
} else
#endif
- {
+_AT_@ -647,9 +650,9 @@ setup(void)
if (!XGetWindowAttributes(dpy, parentwin, &wa))
die("could not get embedding window attributes: 0x%lx",
parentwin);
_AT_@ -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);
-_AT_@ -755,7 +758,7 @@ static void
+_AT_@ -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);
}
-_AT_@ -783,6 +786,12 @@ main(int argc, char *argv[])
+_AT_@ -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]);
_AT_@ -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
_AT_@ -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
--------
Received on Mon Oct 05 2020 - 23:54:30 CEST
This archive was generated by hypermail 2.3.0
: Tue Oct 06 2020 - 00:00:52 CEST