[hackers] sbase: improve man pages and some warnings.

2025-07-31 Thread Hiltjo Posthuma
>From ed5e4d34a16436a37c0e084666fcfb77cc4859c3 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Thu, 31 Jul 2025 14:42:59 +0200 Subject: [PATCH 4/4] improve man pages and some warnings. Checking for warnings: mandoc -Tlint *.1 - Swap .St -p1003.1-2013 macro with text: mdoc does

[hackers] xargs.c: implement -p, -P and -0, add TODO for -L

2025-07-31 Thread Hiltjo Posthuma
>From 2350f520a6dd7e293c5505aaa0983853cdd41ee6 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Thu, 31 Jul 2025 14:40:43 +0200 Subject: [PATCH 3/4] xargs.c: implement -p, -P and -0, add TODO for -L - Add option to read arguments separated by NUL (-0). Useful with find -print0 for exam

[hackers] xargs: fix hang with -s option if argument doesn't fit and cannot be resolved

2025-07-31 Thread Hiltjo Posthuma
Patch below: >From 8ce9c281e07f7d61e2d0c555b9e91bc719b1fbb0 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Thu, 31 Jul 2025 14:26:56 +0200 Subject: [PATCH 2/4] xargs: fix hang with -s option if argument doesn't fit and cannot be resolved Reproduce: printf '12345 123

[hackers] find.1: document -print0 option

2025-07-31 Thread Hiltjo Posthuma
Patch below: >From 257957e533fa2d7d30845e11bf3fa0559d6ae66b Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Thu, 31 Jul 2025 14:26:23 +0200 Subject: [PATCH 1/4] find.1: document -print0 option and improve wording of -print --- find.1 | 7 +-- 1 file changed, 5 insertions(+)

Re: [hackers] [st][PATCH] Eat up "CSI 58" sequences

2025-07-27 Thread Hiltjo Posthuma
On Sun, Jul 27, 2025 at 05:43:47AM +, sasha wrote: > This is used in the wild by systemd systemctl for example and st > misinterpreted it as "blink", because it didn't know "58", then saw "5" > as "blink", and then didn't know "245". > > This should print "foo" as normal text: > > printf

Re: [hackers] [slstatus] more concise memory calculation on Linux || drkhsh

2025-07-26 Thread Hiltjo Posthuma
I don't use slstatus, but wouldn't it be more logical to read meminfo once and store the used variables? Then use them for each status indicator. Now for each variable it reads and parses all the lines from /proc/meminfo each time. Just an idea, On Thu, Jul 24, 2025 at 10:51:59PM +0200, g...@suc

Re: [hackers] [dmenu] [PATCH] Eliminate shell parent from processes spawned with dmenu_run

2025-07-06 Thread Hiltjo Posthuma
On Sat, Jul 05, 2025 at 07:25:28PM -0300, sebastien peterson boudreau wrote: > The double-fork fed into the shell at the end of the pipeline causes the > process to be orphaned and thus adopted by init. > > Upsides: > - Removes unnecessary shell processes, especially for long-running > processes

Re: [hackers] [dwm][PATCH] make ewmh notification and modal/sticky/skiptaskbar windows float

2025-05-23 Thread Hiltjo Posthuma
On Thu, May 22, 2025 at 04:57:46PM -0700, Bang Lee wrote: > Semantically or at least heuristically, these windows are meant to be > floating as well. > Based on my testing, NetWMStateModal and NetWMWindowTypeDialog seem to > be overlapping so I guess we can ignore WindowType and check State > only.

Re: [hackers] [st][PATCH] fix: realloc kpress buffer as needed.

2025-05-13 Thread Hiltjo Posthuma
On Tue, May 13, 2025 at 10:18:45PM +0200, Storkman wrote: > On Tue, May 13, 2025 at 10:56:23AM +, NRK wrote: > > On Mon, May 12, 2025 at 01:53:08AM +0900, yahei wrote: > > > If XBufferOverflow occuers, the client should recall the function with > > > the same event and a buffer of adequate size

Re: [hackers] [surf] [PATCH] Introduce JavaScriptMarkup option (limit site JS w/o user JS)

2025-04-20 Thread Hiltjo Posthuma
On Sun, Apr 20, 2025 at 04:44:32PM +0200, Quentin Rameau wrote: > Hey Artyom, > > > What does it do exactly? I couldn't find a precise description, > > > > https://webkitgtk.org/reference/webkit2gtk/2.36.5/WebKitSettings.html#WebKitSettings--enable-javascript-markup > > I had kind of the same qu

Re: [hackers] [surf] [PATCH] Introduce JavaScriptMarkup option (limit site JS w/o user JS)

2025-04-20 Thread Hiltjo Posthuma
On Sun, Apr 20, 2025 at 06:02:05PM +0400, Artyom Bologov wrote: > Hi y'all, > > This patch introduces JavaScriptMarkup option to make sites JS-clean > without compromizing user/browser running JS for useful things. > > From f2e4f6847698feda4eadcd30dd89c30af56a4d2d Mon Sep 17 00:00:00 2001 > From

Re: [hackers] [surf/surf-webkit2] Fix some typo for kiosk mode in the man-page || Quentin Rameau

2025-04-18 Thread Hiltjo Posthuma
On Fri, Apr 18, 2025 at 02:01:02PM +0200, g...@suckless.org wrote: > commit c3b3b95f4a4b1c84ec6f320d51d31364186bb84b > Author: Quentin Rameau > AuthorDate: Mon Aug 26 18:21:24 2024 +0200 > Commit: Quentin Rameau > CommitDate: Sun Jan 5 12:02:38 2025 +0100 > > Fix some typo for kiosk

Re: [hackers] [dmenu][PATCH] XUngrabKeyboard() instead of XUngrabKey()

2025-03-17 Thread Hiltjo Posthuma
On Sat, Mar 15, 2025 at 07:53:56PM +0100, Adam Purkrt wrote: > XUngrabKey(), which is currently used in cleanup(), is not the right > counterpart to XGrabKeyboard(), which is used in grabkeyboard(), > called from main(). > > XUngrabKeyboard() is the function to use, as grabbing the whole > keyboar

Re: [hackers] [slock] simplify post-lock cmd and die if it fails || NRK

2025-03-09 Thread Hiltjo Posthuma
On Sun, Mar 09, 2025 at 10:10:29AM +0100, g...@suckless.org wrote: > commit a70d5d2429abf8dcb70a8817990975dc9a621d27 > Author: NRK > AuthorDate: Fri Sep 9 14:50:12 2022 +0600 > Commit: Hiltjo Posthuma > CommitDate: Sun Mar 9 10:02:34 2025 +0100 > > simplify pos

Re: [hackers] [st][PATCH] Do not interpret CSI ? u as DECRC

2025-01-30 Thread Hiltjo Posthuma
On Sun, Jan 26, 2025 at 01:40:57PM +0100, Johannes Altmanninger wrote: > The kitty keyboard protocol docs recommend CSI ? u to query support for > that protocol, see https://sw.kovidgoyal.net/kitty/keyboard-protocol/ > > For better or worse, fish shell uses this query to work around bugs > in othe

Re: [hackers] [tabbed][PATCH] focus(): clear XUrgencyHint from the container window

2025-01-21 Thread Hiltjo Posthuma
On Tue, Jan 21, 2025 at 08:28:42PM +0300, Mikhail Pchelin wrote: > On Tue, Jan 21, 2025 at 05:03:25PM +, NRK wrote: > > > + if (clients[c]->urgent && (wmh = XGetWMHints(dpy, clients[c]->win)) && > > > + (win_wmh = XGetWMHints(dpy, win))) { > > > > This will leak if the first XGetWMHints su

Re: [hackers] [tabbed][PATCH] Use UTF8_STRING instead of COMPOUND_TEXT

2025-01-19 Thread Hiltjo Posthuma
On Sun, Jan 19, 2025 at 03:00:37PM +0300, Mikhail Pchelin wrote: > From e64745f33ce10bd6ed2b01ae6da9ed08e56d8594 Mon Sep 17 00:00:00 2001 > From: Mikhail Pchelin > Date: Sun, 19 Jan 2025 14:58:29 +0300 > Subject: [PATCH] Use UTF8_STRING instead of COMPOUND_TEXT > > Using XCompoundTextStyle makes

[hackers] sbase patches reverted (push -f)

2024-12-22 Thread Hiltjo Posthuma
Hi, For your information: The recent sbase patches have been reverted. For me it was easier to git push -f before the patches and reverts happened. Some of the issues: - head: performance regression (simple test showed it was 3x slower because of less efficient getchar buffering and locking),

Re: [hackers] [PATCH] libutil/random: fix conflict between versions

2024-12-20 Thread Hiltjo Posthuma
On Fri, Dec 20, 2024 at 09:44:19PM +0100, Roberto E. Vargas Caballero wrote: > Quoth Elie Le Vaillant : > > --- > > libutil/random.c | 23 +++ > > 1 file changed, 11 insertions(+), 12 deletions(-) > > > > diff --git a/libutil/random.c b/libutil/random.c > > index 72385fb..1508

Re: [hackers] [sbase] head: remove useless buffering || Elie Le Vaillant

2024-12-19 Thread Hiltjo Posthuma
On Thu, Dec 19, 2024 at 11:59:35AM +0100, g...@suckless.org wrote: > commit 83182aa959b2100ea0cf6766e6ef3a553877a710 > Author: Elie Le Vaillant > AuthorDate: Fri Dec 6 10:37:44 2024 +0100 > Commit: Roberto E. Vargas Caballero > CommitDate: Thu Dec 19 11:58:49 2024 +0100 > > head: rem

Re: [hackers] [st][PATCH] Clear screen: Fix edge case

2024-12-06 Thread Hiltjo Posthuma
On Mon, Nov 25, 2024 at 01:31:56PM +0200, Markus Rinne wrote: > With sequence \e[1J, if cursor is on second line, clear the first line. > --- > st.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/st.c b/st.c > index 57c6e96..2e3800e 100644 > --- a/st.c > +++ b/st.c > @@

Re: [hackers] [dwm][PATCH] config.def.h: Add SDL_App to rules

2024-12-06 Thread Hiltjo Posthuma
On Thu, Dec 05, 2024 at 09:29:20PM +0100, Christos Margiolis wrote: > Hiltjo Posthuma wrote: > > On Thu, Dec 05, 2024 at 07:53:58PM +0100, Christos Margiolis wrote: > > > These applications are almost always floating. > > > --- > > > config.def.h | 1

Re: [hackers] [dwm][PATCH] config.def.h: Add SDL_App to rules

2024-12-05 Thread Hiltjo Posthuma
On Thu, Dec 05, 2024 at 07:53:58PM +0100, Christos Margiolis wrote: > These applications are almost always floating. > --- > config.def.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/config.def.h b/config.def.h > index 9efa774..024d9f3 100644 > --- a/config.def.h > +++ b/config.def.h

Re: [hackers] release/tag request: svkbd

2024-11-26 Thread Hiltjo Posthuma
On Tue, Nov 26, 2024 at 03:47:05PM +0100, Maarten van Gompel wrote: > Hi Hiltjo & others, > > Could you please git tag and release a new version of svkbd (0.5 makes > probably most > sense, don't forget to set it in the Makefile first). We want to package > that latest version for Alpine Linux fo

Re: [hackers] [dwm] Redundant code in manage()?

2024-10-29 Thread Hiltjo Posthuma
On Tue, Oct 29, 2024 at 02:25:13AM +, Raymond Cole wrote: > In dwm's manage() function there is this line: > > XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some > windows require this */ > > It's hard to imagine what windows would require this. The commit history

Re: [hackers] [dwm][PATCH] Avoid unsigned integer underflow in drw_text()

2024-10-28 Thread Hiltjo Posthuma
On Mon, Oct 28, 2024 at 12:34:55AM +, Raymond Cole wrote: > --- > drw.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drw.c b/drw.c > index 344de61..c41e6af 100644 > --- a/drw.c > +++ b/drw.c > @@ -248,6 +248,8 @@ drw_text(Drw *drw, int x, int y, unsigned int w, unsigned > int h

Re: [hackers] [dwm][PATCH] Fix bug in die()

2024-10-27 Thread Hiltjo Posthuma
On Sun, Oct 27, 2024 at 03:05:37PM +, Raymond Cole wrote: > fputc() might set errno and thus affect perror(). > --- > util.c | 10 -- > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/util.c b/util.c > index 96b82c9..a289160 100644 > --- a/util.c > +++ b/util.c > @@ -

Re: [hackers] [svkbd][PATCH] Reducing xspacing and yspacing to 1 so touchscreen users have less mistyping.

2024-10-27 Thread Hiltjo Posthuma
On Sun, Oct 27, 2024 at 08:56:37PM +1000, hazardchem wrote: > > Wouldn't this increase mistyping, because the keys are closer to eachother > > and > > there is a smaller gap that is not a key? > > Apologies not explaining further as I thought the title was enough. > > The "dead" space between ke

Re: [hackers] [svkbd][PATCH] Reducing xspacing and yspacing to 1 so touchscreen users have less mistyping.

2024-10-27 Thread Hiltjo Posthuma
On Sun, Oct 27, 2024 at 12:58:13PM +1000, hazardchem wrote: > Signed-off-by: hazardchem > --- > config.def.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/config.def.h b/config.def.h > index d3864c0..e25e6e8 100644 > --- a/config.def.h > +++ b/config.def.h > @@ -8,

Re: [hackers] [surf][patch] Support PDFs

2024-09-14 Thread Hiltjo Posthuma
On Sat, Sep 14, 2024 at 05:14:19AM +0400, Artyom Bologov wrote: > This patch allows webkit-pdfjs-viewer:// links, thus enabling WebKit > built-in PDF viewer. It's a feature that was in WebKitGTK for some time, > and I've been missing it in Surf. So here you go, a patch adding it. > > To: hackers@

Re: [hackers] [PATCH 1/1] Add support for user-defined fallback fonts

2024-09-02 Thread Hiltjo Posthuma
On Sun, Sep 01, 2024 at 05:48:06PM -0700, Eric Pruitt wrote: > On Sat, Aug 31, 2024 at 01:12:20PM +0200, Robert Bilski wrote: > > > +/* CJK Fonts */ > > > +"VL Gothic:pixelsize=12:antialias=true:autohint=true", > > > +"WenQuanYi Micro Hei:pixelsize=12:antialias=true:autohint=true", > >

Re: [hackers] [st][PATCH] fix BadMatch error when embedding on some windows

2024-08-09 Thread Hiltjo Posthuma
On Wed, Aug 07, 2024 at 11:55:59PM -0300, Lucas de Sena wrote: > When embedded, st fails with BadMatch error if the embedder's window has > non-default colormap/depth/visual. This commit fixes that by creating > st's window inside root and then reparent it into embedder. > > The reference window

Re: [hackers] [PATCH][dmenu/libsl] render invalid utf8 bytes as U+FFFD

2024-07-14 Thread Hiltjo Posthuma
Hi NRK, Thanks it looks good, the patches are now pushing into the dmenu repo. I pushed a very small style patch for the recursion check also. While reviewing I noticed: in the future we might want to change the check for ellipsis_width and invalid_width. I think there might be issues with the

Re: [hackers] [st][PATCH] remove secondary call to select

2024-06-29 Thread Hiltjo Posthuma
Hi Jeremy, Thanks for the updated patch and example. The example below doesn't seem to deadlock for me however. More eyes and review would be appreciated, On Fri, Jun 28, 2024 at 07:46:27PM -0700, Jeremy Bobbin wrote: > pasting a large thing into st can cause a deadlock > commit 261ea4b attempt

Re: [hackers] [st][PATCH] remove secondary call to select

2024-06-28 Thread Hiltjo Posthuma
On Fri, Jun 28, 2024 at 11:36:20AM -0700, Jeremy wrote: > On 06/28/24 10:52AM, Hiltjo Posthuma wrote: > > Do you perhaps also have a way to easily reproduce this deadlock condition? > > I cannot reproduce the deadlock on my machine. All I want to do is > simplify ttywrite &

Re: [hackers] [st][PATCH] remove secondary call to select

2024-06-28 Thread Hiltjo Posthuma
Hi Jeremy, I glanced the patch and it looks good. Do you perhaps also have a way to easily reproduce this deadlock condition? On Thu, Jun 27, 2024 at 06:51:28PM -0700, Jeremy Bobbin wrote: > because underlying programs can request info from the tty, there was a > potential recursion in ttyread:

Re: [hackers] [dwm][patch] Add missing void to updateclientlist definition

2024-06-08 Thread Hiltjo Posthuma
Applied, thanks, On Sat, Jun 08, 2024 at 07:36:15PM +0900, Pontus Stenetorp wrote: > About as trivial as a patch gets. > --- > commit 058d5d926191f78a1d31041c692b0185e7d7b184 (6.5-ninjin) > from: Pontus Stenetorp > date: Sat Jun 8 10:20:05 2024 UTC >

Re: [hackers] [st][PATCH] sgr-patch

2024-05-01 Thread Hiltjo Posthuma
On Mon, Apr 29, 2024 at 08:18:00PM +0100, Mikhail Kot wrote: > Hi! > > Sorry, didn't see your message. > SGR allows you to specify color delimiters in two way: colon > or semicolon. The semicolon version is now legacy one, and many > applications, e.g. aerc (its library vaxis-ui, to be precise) >

Re: [hackers] [st][PATCH] Reset title when an empty title string is given

2024-04-03 Thread Hiltjo Posthuma
On Tue, Apr 02, 2024 at 09:41:15PM -0400, DOGMAN wrote: > With this patch, st will reset its window title when an empty string is > given as the terminal title. For example: > printf "\033]0;\007" > > Some applications, like termdown, expect this functionality. xterm > implements it, but it

Re: [hackers] [st] Fix cursor move with wide glyphs || Quentin Rameau

2024-03-30 Thread Hiltjo Posthuma
On Sat, Mar 30, 2024 at 01:59:28AM +0100, Storkman wrote: > On Fri, Mar 29, 2024 at 07:27:43PM +0100, Hiltjo Posthuma wrote: > > On Wed, Mar 27, 2024 at 04:11:27PM +0100, Storkman wrote: > > > On Sun, Feb 25, 2024 at 11:57:03AM +0100, g...@suckless.org wro

Re: [hackers] [st] Fix cursor move with wide glyphs || Quentin Rameau

2024-03-29 Thread Hiltjo Posthuma
On Wed, Mar 27, 2024 at 04:11:27PM +0100, Storkman wrote: > On Sun, Feb 25, 2024 at 11:57:03AM +0100, g...@suckless.org wrote: > > commit 7473a8d1a57e5f9aba41b953f4e498c35e1c9dc5 > > Author: Quentin Rameau > > AuthorDate: Sun Feb 25 01:31:31 2024 +0100 > >

Re: [hackers] [st][PATCH] set upper limit for REP escape sequence argument

2024-03-04 Thread Hiltjo Posthuma
On Mon, Mar 04, 2024 at 10:24:36PM +0200, Tommi Hirvola wrote: > On Mon, Mar 04, 2024 at 01:55:29PM +0100, Hiltjo Posthuma wrote: > > I'm not sure about it. You could still chain REP sequences and "DoS" it. > > Fortunately, chained REP sequences can be terminated

Re: [hackers] [st][PATCH] set upper limit for REP escape sequence argument

2024-03-04 Thread Hiltjo Posthuma
On Mon, Mar 04, 2024 at 12:56:30PM +0200, Tommi Hirvola wrote: > Previously, printf 'L\033[2147483647b' would call tputc('L') 2^31 times, > making st unresponsive. This commit allows repeating the last character > at most 65535 times in order to prevent freezing and DoS attacks. > --- > st.c | 2 +

Re: [hackers] [st][PATCH] csi: check for private marker in 'S' case

2024-02-18 Thread Hiltjo Posthuma
On Sun, Feb 18, 2024 at 06:56:49AM -0600, Tim Culverhouse wrote: > The handler for 'S' final character does not check for a private > marker. This can cause a conflict with a sequence called 'XTSMGRAPHICS' > which also has an 'S' final character, but uses the private marker '?'. > Without checking

Re: [hackers] [svkbd][PATCH] this patch fixes uppercase in armenian (and perhaps some other) layouts. svkbd was previously registering a key in one modification (xorg accepts up to 4 modifications). w

2023-12-13 Thread Hiltjo Posthuma
s almost every letter in > > armenian layout, one thing still don't work. namely, this line: > > { "՝","՜", XK_Armenian_exclam, 1 }, > > > > for some reason only the second character described in this line ("՜") gets > > printed whet

Re: [hackers] [svkbd][PATCH] this patch fixes uppercase in armenian (and perhaps some other) layouts. svkbd was previously registering a key in one modification (xorg accepts up to 4 modifications). w

2023-12-03 Thread Hiltjo Posthuma
On Sun, Dec 03, 2023 at 08:22:04PM +0400, norayr chilingarian wrote: > --- > svkbd.c | 11 ++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/svkbd.c b/svkbd.c > index e4dbd15..cce2463 100644 > --- a/svkbd.c > +++ b/svkbd.c > @@ -481,9 +481,18 @@ press(Key *k, KeySym b

Re: [hackers] [st][PATCH] Add terminfo entries for bracketed paste mode

2023-10-12 Thread Hiltjo Posthuma
On Thu, Oct 12, 2023 at 12:40:15PM +0200, Peter Hofmann wrote: > It has been brought to my attention that this patch breaks pasting text > in older versions of Vim, e.g. the ones coming with OpenBSD 7.2 or > Ubuntu 22.04. The ncurses terminfo db mentions that Vim 9.0.1117 or > newer is needed. > >

Re: [hackers] [st][PATCH] Unhide cursor on RIS (\033c)

2023-10-08 Thread Hiltjo Posthuma
On Sat, Oct 07, 2023 at 07:40:45AM +0200, Peter Hofmann wrote: > From: Peter Hofmann > > It is unclear if it's "required" to do this on RIS, but it's useful when > calling reset(1) after interactive programs have crashed and garbled up > the screen. > > FWIW, other terminals do it as well (teste

Re: [hackers] [dwm][PATCH] Implement key shortcut mapping

2023-09-24 Thread Hiltjo Posthuma
On Sun, Sep 24, 2023 at 05:34:48AM +, suiso67@macadamia.rocks wrote: > From: suiso67 > > --- > config.def.h | 43 +++ > dwm.c| 47 +++ > 2 files changed, 90 insertions(+) > > diff --git a/config.def.

Re: [hackers] [st] [PATCH] Makefile: always output the build options, even when building with install

2023-09-22 Thread Hiltjo Posthuma
On Sun, Sep 17, 2023 at 12:11:28AM +, Tom Schwindl wrote: > --- > Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index 470ac86407bb..6eb2d9d04852 100644 > --- a/Makefile > +++ b/Makefile > @@ -40,7 +40,7 @@ dist: clean > tar -cf -

Re: [hackers] [dmenu][PATCH] Allow only one dmenu_run selection

2023-08-30 Thread Hiltjo Posthuma
On Wed, Aug 30, 2023 at 11:25:18AM -0700, Jeremy wrote: > On 08/30/23 05:41PM, Christopher Lang wrote: > > This would be my implementation for executing all selected commands: > > > > #!/bin/sh > > for x in $(dmenu_path | dmenu "$@"); do > > echo "$x" | ${SHELL:-"/bin/sh"} & > > done > > > > I

Re: [hackers] [dmenu][PATCH] Allow only one dmenu_run selection

2023-08-30 Thread Hiltjo Posthuma
On Wed, Aug 30, 2023 at 05:41:28PM +0100, Christopher Lang wrote: > On Wed, Aug 30, 2023 at 05:48:13PM +0200, Страхиња Радић wrote: > > On 23/08/30 09:43AM, Randy Palamar wrote: > > > Personally I see little need for such a patch. I don't really > > > think anyone is pressing + by mistake; they > >

Re: [hackers] [dwm][patch] Stop input focus on pointers unselected monitor

2023-08-27 Thread Hiltjo Posthuma
On Sun, Aug 27, 2023 at 08:09:47PM +0100, Christopher Lang wrote: > To get more feedback on this patch, I will submit it to the wiki under > the name fixmultimon. In the patch wiki page, I will add a message > explaining it is intended for the mainline but is waiting for more > feedback. > > -- >

Re: [hackers] [dwm][patch] Stop input focus on pointers unselected monitor

2023-08-16 Thread Hiltjo Posthuma
On Wed, Aug 16, 2023 at 06:06:40PM +0200, Storkman wrote: > On Wed, Aug 16, 2023 at 10:07:16AM +0200, Hiltjo Posthuma wrote: > > On Tue, Aug 15, 2023 at 10:43:32AM +0100, Christopher Lang wrote: > > > When the pointer is on an unselected monitor and is not moving, it > >

Re: [hackers] [dwm][patch] Stop input focus on pointers unselected monitor

2023-08-16 Thread Hiltjo Posthuma
On Tue, Aug 15, 2023 at 10:43:32AM +0100, Christopher Lang wrote: > When the pointer is on an unselected monitor and is not moving, it > should not interfere what window is selected/focused. > > 1: > > From > https://tronche.com/gui/x/xlib/events/input-focus/normal-and-grabbed.html: > When the

Re: [hackers] [dwm][patch] ISO 8859-1-only window name bugfix

2023-07-12 Thread Hiltjo Posthuma
On Wed, Jul 12, 2023 at 06:48:45PM +0200, Страхиња Радић wrote: > Hi, recently André Desgualdo Pereira reported a bug in dwm when window names > consist only of characters in ISO 8859-1. In short, windows with such names > had their names broken at the place of ISO 8859-1-specific characters whic

Re: [hackers] [dmenu][PATCH] minor improvement to the nomatches cache

2023-07-06 Thread Hiltjo Posthuma
On Thu, Jul 06, 2023 at 08:42:00PM +0600, NRK wrote: > 1. use `unsigned int` to store the codepoints, this avoids waste on >common case where `long` is 64bits. and POSIX guarantees `int` to be >at least 32bits so there's no risk of truncation. > 2. since switching to `unsigned int` cuts dow

Re: [hackers] [st][PATCH] Fix for wide character being incorrectly cleared on MODE_INSERT

2023-06-25 Thread Hiltjo Posthuma
On Sun, Jun 25, 2023 at 05:38:33AM +, Shi Tian wrote: > Under insert mode, when inserting a normal character in front of > a wide character, the affected region is shifted to the right by > one cell. However, the empty cell is reset as if being a part of a > wide character, causing the followin

Re: [hackers] [dmenu][PATCH] fix BadMatch error when embedding on some windows

2023-04-06 Thread Hiltjo Posthuma
On Wed, Apr 05, 2023 at 05:11:49PM -0300, Lucas de Sena wrote: > When embedded into another window, dmenu will fail with the BadMatch > error if that window have not the same colormap/depth/visual as the > root window. > > That happens because dmenu inherits the colormap/depth/visual from > its pa

Re: [hackers] [tabbed][PATCH] fix: faulty zombie reaping

2023-03-11 Thread Hiltjo Posthuma
On Sat, Mar 11, 2023 at 06:20:07AM +0600, NRK wrote: > issues with the current signal handler: > > 1. die() isn't async-signal-safe > 2. there's a race-window during reinstating the signal handler allowing >zombies to be produced (should be rare in practice). > 3. if waitpid fails, it will clo

Re: [hackers] [dwm][PATCH] config.mk: update to _XOPEN_SOURCE=700L

2023-02-17 Thread Hiltjo Posthuma
On Fri, Feb 17, 2023 at 11:05:09AM +0600, NRK wrote: > SA_NOCLDWAIT is marked as XSI in the posix spec [0] and freebsd seems to > more be strict about the feature test macro [1]. > > so update the macro to use _XOPEN_SOURCE=700L instead, which is > equivalent to _POSIX_C_SOURCE=200809L except that

Re: [hackers] [dwm] [PATCH] add a comment to clarify a potential overflow of ltsymbol

2023-02-15 Thread Hiltjo Posthuma
On Wed, Feb 15, 2023 at 05:28:43PM +, Tom Schwindl wrote: > Hi Hiltjo, > > > Hi, > > > > I think it is too verbose and don't think the comment is neccesary. > > > > I can understand the verbosity part, but that's something I can change. > My point here was more that bug reports get posted to

Re: [hackers] [dwm] [PATCH] add a comment to clarify a potential overflow of ltsymbol

2023-02-15 Thread Hiltjo Posthuma
On Wed, Feb 15, 2023 at 11:29:26AM +, Tom Schwindl wrote: > In case the strncpy() call is advised to copy >=16 characters, ltsymbol > overflows. > As dwm does not expect to have a ltsymbol bigger than 15 characters, there > will be > no length check[0]. Our target audience are programmers, th

Re: [hackers] [st][PATCH] Add support for DSR response "OK" escape sequence

2023-02-07 Thread Hiltjo Posthuma
On Tue, Feb 07, 2023 at 11:20:36AM -0500, Adam Price wrote: > On Tue, Feb 7, 2023 at 11:17 AM Roberto E. Vargas Caballero > wrote: > > > > On Tue, Feb 07, 2023 at 10:54:57AM -0500, Adam Price wrote: > > > On Mon, Feb 6, 2023 at 12:06 PM Roberto E. Vargas Caballero > > > wrote: > > > > > > > > Hi,

Re: [hackers] [st][PATCH] Add support for DSR response "OK" escape sequence

2023-02-07 Thread Hiltjo Posthuma
On Sun, Feb 05, 2023 at 06:39:24PM -0500, Adam Price wrote: > --- > VT100 defines an escape sequence [1] called Device Status Report (DSR). When > the DSR sequence received is `csi 5n`, an "OK" response `csi 0n` is returned. > This patch adds that "OK" response. > > I encountered this missing sequ

Re: [hackers] [st][PATCH]] Fixed osc color reset without parameter->resets all colors

2023-02-05 Thread Hiltjo Posthuma
On Sat, Feb 04, 2023 at 12:15:29PM +0100, wim wrote: > --- > st.c | 8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/st.c b/st.c > index 62def59..6b9abc0 100644 > --- a/st.c > +++ b/st.c > @@ -1932,9 +1932,11 @@ strhandle(void) > if (p && !strcmp(p, "?")) { > osc_color

Re: [hackers] [svkbd][PATCH] dvorak layout

2023-02-05 Thread Hiltjo Posthuma
On Sat, Feb 04, 2023 at 11:41:57PM +0400, norayr chilingarian wrote: > From: Norayr Chilingarian > > --- > layout.mobile-intl.h | 71 +++- > 1 file changed, 70 insertions(+), 1 deletion(-) > > diff --git a/layout.mobile-intl.h b/layout.mobile-intl.h > ind

Re: [hackers] Re: [svkbd][PATCH] armenian layout

2023-01-29 Thread Hiltjo Posthuma
Pushed, thanks! (there was still one space before _zhe_ but I fixed it). On Sun, Jan 29, 2023 at 08:26:26PM +0400, նորայր wrote: > This is a second version, with corrected tabs and reorderings. > > On Sun, 29 Jan 2023 19:22:46 +0400 > norayr chilingarian wrote: > > > From: Norayr Chilingarian

Re: [hackers] [svkbd][PATCH] armenian layout

2023-01-29 Thread Hiltjo Posthuma
Hi, There are some white-space issues in the patch, can you change it to TABs? Can you not reorder the keys_dialer section? Just change it in-place, this makes it slightly easier to review also. Can someone test if this layout is correct? Thanks, On Sun, Jan 29, 2023 at 05:13:15AM +0400, noray

Re: [hackers] Re: [dwm][PATCH v2] Use sigaction(SA_NOCLDWAIT) for SIGCHLD handling

2023-01-28 Thread Hiltjo Posthuma
On Sat, Jan 28, 2023 at 03:04:50PM +0600, NRK wrote: > Hi Hiltjo, > > On Sat, Jan 28, 2023 at 12:11:44AM +0100, Hiltjo Posthuma wrote: > > We do not need to waitpid() on child processes. It is handled already > > by using sigaction(). > > Here's a test case. I se

Re: [hackers] Re: [dwm][PATCH v2] Use sigaction(SA_NOCLDWAIT) for SIGCHLD handling

2023-01-27 Thread Hiltjo Posthuma
On Thu, Jan 26, 2023 at 07:44:08PM +0600, NRK wrote: > On Wed, Jan 25, 2023 at 09:17:53PM +0100, Hiltjo Posthuma wrote: > > Using the new patch it does not handle zombie/defunct processes anymore on > > this > > machine. To reproduce it, in .xinitrc, on a dusty machine:

Re: [hackers] Re: [dwm][PATCH v2] Use sigaction(SA_NOCLDWAIT) for SIGCHLD handling

2023-01-25 Thread Hiltjo Posthuma
On Wed, Jan 25, 2023 at 04:24:36PM +0600, NRK wrote: > On Wed, Jan 25, 2023 at 09:37:58AM +0100, Hiltjo Posthuma wrote: > > I don't think there can be any zombies since it is run in setup() before any > > processes can spawn (via keybindings etc) or am I overlooking something

Re: [hackers] Re: [dwm][PATCH v2] Use sigaction(SA_NOCLDWAIT) for SIGCHLD handling

2023-01-25 Thread Hiltjo Posthuma
On Wed, Jan 25, 2023 at 08:39:51AM +, Chris Down wrote: > Hiltjo Posthuma writes: > > I don't think there can be any zombies since it is run in setup() before any > > processes can spawn (via keybindings etc) or am I overlooking something > > obvious? > >

Re: [hackers] Re: [dwm][PATCH v2] Use sigaction(SA_NOCLDWAIT) for SIGCHLD handling

2023-01-25 Thread Hiltjo Posthuma
On Wed, Jan 25, 2023 at 12:06:25PM +0600, NRK wrote: > On Tue, Jan 24, 2023 at 09:01:08PM +0100, Hiltjo Posthuma wrote: > > Although of course checking errno on a success condition is a bit wonky in > > this test case. > > It was just an illustration that the malloc succe

Re: [hackers] Re: [dwm][PATCH v2] Use sigaction(SA_NOCLDWAIT) for SIGCHLD handling

2023-01-24 Thread Hiltjo Posthuma
On Tue, Jan 24, 2023 at 10:25:11AM +0600, NRK wrote: > On Mon, Jan 23, 2023 at 08:05:19PM +0100, Hiltjo Posthuma wrote: > > Do you perhaps also have some simple way to reproduce where it causes > > issues in > > some real world use-case? > > > > Ideally some c

Re: [hackers] Re: [dwm][PATCH v2] Use sigaction(SA_NOCLDWAIT) for SIGCHLD handling

2023-01-23 Thread Hiltjo Posthuma
On Mon, Jan 23, 2023 at 07:34:04AM +, Chris Down wrote: > Thanks NRK for bringing this one up again :-) > > NRK writes: > > If there's any specific issue with Chris' patch which is blocking the > > merge then I'd be happy to address them. > > Likewise -- happy to act on any feedback. > > I'v

Re: [hackers] [dwm] [PATCH] use correct conversion specifier for an unsigned integer

2023-01-15 Thread Hiltjo Posthuma
On Sat, Jan 14, 2023 at 11:08:39PM +, Tom Schwindl wrote: > --- > dwm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/dwm.c b/dwm.c > index 03baf42b3502..d832678ab5aa 100644 > --- a/dwm.c > +++ b/dwm.c > @@ -1121,7 +1121,7 @@ monocle(Monitor *m) > if (

Re: [hackers] [sent] [PATCH] remove unnecessary NULL checks and add `void` for an empty parameter list

2023-01-10 Thread Hiltjo Posthuma
On Tue, Jan 10, 2023 at 05:39:33PM +, Tom Schwindl wrote: > --- > I sent (hehe) this a long time ago, it might be of interest now that some > work is done. > > --- > sent.c | 30 ++ > 1 file changed, 14 insertions(+), 16 deletions(-) > > diff --git a/sent.c b/sent

Re: [hackers] [sent][PATCH] free XImage before creating a new one

2023-01-09 Thread Hiltjo Posthuma
On Mon, Jan 09, 2023 at 03:07:48PM +, Augusto Castelo wrote: > ffprepare was allocating a new XImage but wasn't freeing the > previously allocated one > --- > sent.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/sent.c b/sent.c > index 9534fca..d949d71 100644 > --- a/sent.c > ++

Re: [hackers] [dwm][PATCH] grabkeys: Avoid missing events when a keysym maps to multiple keycodes

2022-12-07 Thread Hiltjo Posthuma
On Mon, Dec 05, 2022 at 11:01:12PM +, Chris Down wrote: > It's not uncommon for one keysym to map to multiple keycodes. For > example, the "play" button on my keyboard sends keycode 172, but my > bluetooth headphones send keycode 208, both of which map back to > XF86AudioPlay: > > % xmodma

Re: [hackers] Re: [dwm][PATCH] applyrules: fix potential false positive match

2022-10-29 Thread Hiltjo Posthuma
On Sat, Oct 29, 2022 at 06:43:12PM +0600, NRK wrote: > On Sat, Oct 29, 2022 at 04:59:29PM +0600, NRK wrote: > > - class= ch.res_class ? ch.res_class : broken; > > - instance = ch.res_name ? ch.res_name : broken; > > + class= ch.res_class ? ch.res_class : ""; > > + instance = ch.re

Re: [hackers] [st][PATCH] Fix buffer overflow when handling composed input

2022-10-23 Thread Hiltjo Posthuma
On Sun, Oct 23, 2022 at 04:18:42PM +, Andy Gozas wrote: > This is a fix for a problem with ST that I found. > > St relies on an incorrect assumption of how XmbLookupString function > behaves. When a composed input comes with a string that can not fit into the > buffer that was given to it — it

Re: [hackers] [tabbed] Makefile improvements || Hiltjo Posthuma

2022-10-16 Thread Hiltjo Posthuma
On Sun, Oct 16, 2022 at 01:24:03AM +0200, Laslo Hunhold wrote: > On Fri, 14 Oct 2022 20:08:11 +0200 > Hiltjo Posthuma wrote: > > Dear Hiltjo, > > > Yes, but things can change, > > > > Some rationale of the changes are described here: > > > > goph

Re: [hackers] [tabbed] Makefile improvements || Hiltjo Posthuma

2022-10-14 Thread Hiltjo Posthuma
On Fri, Oct 14, 2022 at 11:29:23PM +0600, NRK wrote: > > * Remove config.mk > > This... > > > diff --git a/config.mk b/config.mk > > index e69209e..0c06c2c 100644 > > --- a/config.mk > > +++ b/config.mk > > ...does not look "removed" to me :) > > Also I think it's best to keep it, to be con

Re: [hackers] [tabbed] Makefile: add xembed.1 in the dist target || Hiltjo Posthuma

2022-10-13 Thread Hiltjo Posthuma
On Thu, Oct 13, 2022 at 06:35:32PM +0200, Laslo Hunhold wrote: > On Thu, 13 Oct 2022 01:09:22 +0200 > Hiltjo Posthuma wrote: > > Dear Hiltjo, > > > Theres no need for a dependency on git, this way it also works when > > downloading the tarball and running make dist (j

Re: [hackers] [tabbed] Makefile: add xembed.1 in the dist target || Hiltjo Posthuma

2022-10-12 Thread Hiltjo Posthuma
On Thu, Oct 13, 2022 at 03:40:34AM +0600, NRK wrote: > On Wed, Oct 12, 2022 at 11:02:14PM +0200, g...@suckless.org wrote: > > commit 910e67db33dc295b73c1861a79d520b0bd527b2d > > Author: Hiltjo Posthuma > > AuthorDate: Wed Oct 12 22:55:21 2022 +0200 > >

Re: [hackers] [tabbed] bump version to 0.7 || Hiltjo Posthuma

2022-10-12 Thread Hiltjo Posthuma
org: > > > > commit b372f9ce28610dc8dd860abd42f9837972bc5adb > > Author: Hiltjo Posthuma > > AuthorDate: Tue Oct 4 19:38:44 2022 +0200 > > Commit: Hiltjo Posthuma > > CommitDate: Tue Oct 4 19:38:44 2022 +0200 > > > >bump version to 0.7 &

Re: [hackers] [sic] bump version to 1.4 || Hiltjo Posthuma

2022-10-09 Thread Hiltjo Posthuma
On Sun, Oct 09, 2022 at 07:26:35PM +0200, Joerg Jung wrote: >I wonder why this does not show up here? > >[1]http://git.suckless.org/sic/ > >On 4. Oct 2022, at 19:29, [2]g...@suckless.org wrote: > >commit d028623f079c5c8fcdcc9ed9925a0d79dfd2c940 >Aut

Re: [hackers] [ii] rename clean() to cleanup() || Hiltjo Posthuma

2022-10-02 Thread Hiltjo Posthuma
On Sun, Oct 02, 2022 at 01:38:16PM +0200, Petr Vaněk wrote: > On Sat, Oct 01, 2022 at 01:19:29PM +0200, g...@suckless.org wrote: > > commit b751e4f08ddaa56585407abebc0534d848cb4ba5 > > Author: Hiltjo Posthuma > > AuthorDate: Sat Oct 1 13:18:02 2022 +0200 > >

Re: [hackers] [st][PATCH] reset the cursor shape to the default with DECSCUSR param 0

2022-09-06 Thread Hiltjo Posthuma
81 > > 2022年9月6日(火) 22:35 Hiltjo Posthuma : > > Hi, > > > > Are you sure it is correct? > > > > The page https://invisible-island.net/xterm/ctlseqs/ctlseqs.html describes: > > Thanks, I wouldn't include in the commit message all the related > di

Re: [hackers] [st][PATCH] reset the cursor shape to the default with DECSCUSR param 0

2022-09-06 Thread Hiltjo Posthuma
On Tue, Sep 06, 2022 at 09:40:21PM +0900, Koichi Murase wrote: > The empty parameter or parameter 0 of terminal control functions > typically mean the default. In fact, typical implementations of > DECSCUSR in other terminals (vte, alacritty, mintty, vte, wt, etc.) > treat them as the default curs

Re: [hackers] [dmenu] tab-complete: figure out the size before copying || NRK

2022-09-02 Thread Hiltjo Posthuma
On Fri, Sep 02, 2022 at 02:58:15PM +0300, Santtu Lakkala wrote: > On 2.9.2022 14.01, g...@suckless.org wrote: > > commit 528d39b011afb7ef6fd794ba6b74155d4e69bc68 > dmenu.c b/dmenu.c > > index 969f6d8..6b285df 100644 > > --- a/dmenu.c > > +++ b/dmenu.c > > @@ -517,9 +517,9 @@ insert: > > case XK

Re: [hackers] [ii] [PATCH] ii: Remove unnecessary explicit zeroing of variables

2022-09-02 Thread Hiltjo Posthuma
On Fri, Sep 02, 2022 at 01:07:15PM +, Tom Schwindl wrote: > --- > ii.c | 20 ++-- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/ii.c b/ii.c > index 0856e8f010d3..520f75d1618a 100644 > --- a/ii.c > +++ b/ii.c > @@ -32,7 +32,7 @@ size_t strlcpy(char *, con

Re: [hackers] [ii][PATCH] use square brackets for optional -u parameter in man page

2022-09-02 Thread Hiltjo Posthuma
On Thu, Sep 01, 2022 at 01:56:04PM +, Tom Schwindl wrote: > Hi, > > On Tue Aug 30, 2022 at 10:43 AM CEST, Petr Vaněk wrote: > > --- > > ii.1 | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/ii.1 b/ii.1 > > index 8e06af7..db05ab6 100644 > > --- a/ii.1 > > +++

Re: [hackers] [dwm][PATCH] applyrules: read rules[] with the `r` pointer directly

2022-08-30 Thread Hiltjo Posthuma
On Mon, Aug 29, 2022 at 05:49:06PM -0500, explosion0men...@gmail.com wrote: > From: explosion-mental > > no need for `i` so remove the i variable. > > :gigachad: > --- > dwm.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/dwm.c b/dwm.c > index e5efb6a..c2dcb15 100

Re: [hackers] [dwm][PATCH] Remove dmenumon variable

2022-08-26 Thread Hiltjo Posthuma
On Fri, Aug 26, 2022 at 02:48:46PM +0200, Stein wrote: > Reasoning: Since 2011 dmenu has been capable of working out which > monitor currently has focus in a Xinerama setup, making the use > of the -m flag more or less redundant. > > This is easily demonstrated by using dmenu in any other window >

Re: [hackers] [dwm][PATCH RESEND 0/2] Const-correctness fixes

2022-08-22 Thread Hiltjo Posthuma
On Mon, Aug 22, 2022 at 02:01:25PM +0600, NRK wrote: > On Sun, Aug 21, 2022 at 11:08:43PM +0100, Chris Down wrote: > > I originally sent these a few years ago and the reply was that > > const-correctness wasn't something cared about, but seeing other const > > changes in dwm, and purely const-corre

Re: [hackers] [dwm][PATCH] config.def.h: make keys and buttons const

2022-08-19 Thread Hiltjo Posthuma
On Thu, Aug 18, 2022 at 10:13:08PM +0600, NRK wrote: > pretty much all other variables are declared as const when they're not > modified. > --- > config.def.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/config.def.h b/config.def.h > index f4cd153..ecf2bc2 100644 >

Re: [hackers] [dwm][PATCH] config.def.h: add comment about symbol size

2022-08-18 Thread Hiltjo Posthuma
On Thu, Aug 18, 2022 at 10:12:35PM +0600, NRK wrote: > also changes Layout.symbol to be `char [16]` similar to Monitor.ltsymbol > this should allow the compiler to emit a warning if the symbol exceeds > 17 bytes. > --- > config.def.h | 4 > dwm.c| 4 ++-- > 2 files changed, 6 insertio

Re: [hackers] [quark][PATCH] Fix buffer over-read in decode()

2022-08-16 Thread Hiltjo Posthuma
On Tue, Aug 16, 2022 at 05:42:50PM +, HushBugger wrote: > The format specifier for parsing percent-formatted characters uses > a maximum number of digits, not an exact number of digits. > > If the hex number has only one digit this will skip a character, > potentially pointing past the termina

  1   2   3   4   5   >