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 terminat

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
e 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 whether the shift is pressed or not. i will try to understand wh

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

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

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

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

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

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

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

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

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

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,

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

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, "?")) { >

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 >

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,

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 see

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 someth

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? > > You c

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 so

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. > >

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

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: > > %

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 =

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 —

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

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 > discuss

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

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

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 *,

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

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

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

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

Re: [hackers] [[dwm][PATCH]] drw / utf8decode : simpler is better ?

2022-08-15 Thread Hiltjo Posthuma
On Tue, Jul 19, 2022 at 04:38:34PM +0200, nenesses wrote: > --- > drw.c | 15 +++ > 1 file changed, 3 insertions(+), 12 deletions(-) > > diff --git a/drw.c b/drw.c > index ced7d37..b6073a4 100644 > --- a/drw.c > +++ b/drw.c > @@ -25,16 +25,6 @@ utf8decodebyte(const char c, size_t *i)

Re: [hackers] [dwm][PATCH] ensure layout symbol is properly nul-terminated

2022-08-13 Thread Hiltjo Posthuma
Yes it affects readability and I don't like the patch. BTW please don't send HTML mail to this mailinglist. Thanks, On Sat, Aug 13, 2022 at 08:47:41AM +0200, Stein Gunnar Bakkeby wrote: >Doesn't this affect readability? Would it be easier to make the layout >symbol size 15 (one less

Re: [hackers] [dwm][PATCH] ensure layout symbol is properly nul-terminated

2022-08-13 Thread Hiltjo Posthuma
On Sat, Aug 13, 2022 at 09:00:06AM +0600, NRK wrote: > the dwm source code somewhat silently assumes that the symbol will fit > into 16 bytes. but this may not be the case since users can define > longer symbols in `config.h` (and there's no comment or note stating > anything about the size

Re: [hackers] A better mailing list web archiver for suckless.org ... ?

2022-08-12 Thread Hiltjo Posthuma
On Fri, Aug 12, 2022 at 05:56:48PM +0200, Thomas Oltmann wrote: > Use gitea for what? To host my code instead of on GitHub? > I agree GitHub is pretty janky, but at least it's readily available. > I currently don't have a server + domain lying around. > > Personally, I think git.suckless.org

Re: [hackers] A better mailing list web archiver for suckless.org ... ?

2022-08-11 Thread Hiltjo Posthuma
On Thu, Aug 11, 2022 at 02:02:50AM +0200, Thomas Oltmann wrote: > Hi Hiltjo, > > thanks for the feedback. > > > In general the points look good to me. I haven't looked at the code. > > > > I think we can ignore some cruft. HTML mail should be avoided, atleast on > > suckless. > > > > Supporting

Re: [hackers] A better mailing list web archiver for suckless.org ... ?

2022-08-11 Thread Hiltjo Posthuma
On Wed, Aug 10, 2022 at 08:09:25PM -0400, Sebastian LaVine wrote: > Have you guys heard of bubger? > > https://git.causal.agency/bubger/ > > It might be useful for this purpose. > I'm not sure, it seems to require IMAP. The tool should work on raw mails or maildir/mbox instead. -- Kind

Re: [hackers] A better mailing list web archiver for suckless.org ... ?

2022-08-10 Thread Hiltjo Posthuma
On Wed, Aug 10, 2022 at 09:29:43PM +0200, Thomas Oltmann wrote: > Hi all! > > I think we can all agree that the current web archive over at > lists.suckless.org isn't all that great; > Author names get mangled, the navigation is terrible, some messages > are duplicated, some missing. > > That's

Re: [hackers] [dwm][PATCH] Simplify client y-offset correction

2022-08-10 Thread Hiltjo Posthuma
 c->y = c->mon->wy + c->mon->wh - HEIGHT(c); >  c->x = MAX(c->x, c->mon->wx); >My reasoning for this is that I think the whole block should signal the >intent that we want to have the window placed within the window >area, rather than wit

Re: [hackers] [dwm][PATCH] Simplify client y-offset correction

2022-08-09 Thread Hiltjo Posthuma
On Tue, Aug 09, 2022 at 10:38:08AM +0200, Stein wrote: > The reasoning behind the original line may be lost to time as > it does not make much sense checking the position on the x-axis > to determine how to position the client on the y-axis. > > In the context of multi-monitor setups the monitor

Re: [hackers] [libs-style][PATCH] codestyle: die should be before ecalloc

2022-08-08 Thread Hiltjo Posthuma
On Mon, Aug 08, 2022 at 07:53:40PM +0600, NRK wrote: > On Mon, Aug 08, 2022 at 07:47:50PM +0600, NRK wrote: > > > die should be before ecalloc > > > > Why should it be before `ecalloc` ? There's prototype in util.h already. > > So the order of definition is irrelevant. > > Ah, I missed the

Re: [hackers] [dwm][PATCH] code-style: simplify some checks

2022-08-06 Thread Hiltjo Posthuma
On Sat, Aug 06, 2022 at 04:27:13AM +0600, NRK wrote: > main change here is making the `zoom()` logic saner. the rest of the > changes are just small stuff which accumulated on my local branch. > > pop() must not be called with NULL. and `zoom()` achieves this, but in a > very (unnecessarily)

Re: [hackers] [dwm][PATCH] spawn: reduce 2 lines, change fprintf() + perror() + exit() to die("... :")

2022-08-02 Thread Hiltjo Posthuma
On Fri, Jul 29, 2022 at 06:26:04PM -0500, explosion0men...@gmail.com wrote: > From: explosion-mental > > when calling die and the last character of the string corresponds to > ':', die() will call perror(). See util.c > > Cuz muh lines of code!1 > --- > dwm.c | 4 +--- > 1 file changed, 1

Re: [hackers] [dwm][PATCH] unmanage: stop listening for events for unmanaged windows

2022-08-02 Thread Hiltjo Posthuma
On Mon, Aug 01, 2022 at 11:42:44AM +0200, Stein wrote: > This is in particular to avoid flickering in dwm (and high CPU usage) > when hovering the mouse over a tabbed window that was previously > managed by dwm. > > Consider the following two scenarios: > > 1) > > We start tabbed (window

Re: [hackers] [dwm][PATCH] spawn: reduce 2 lines, change fprintf() + perror() + exit() to die("... :")

2022-07-30 Thread Hiltjo Posthuma
On Fri, Jul 29, 2022 at 06:26:04PM -0500, explosion0men...@gmail.com wrote: > From: explosion-mental > > when calling die and the last character of the string corresponds to > ':', die() will call perror(). See util.c > > Cuz muh lines of code!1 > --- > dwm.c | 4 +--- > 1 file changed, 1

Re: [hackers] [libsl][PATCH] die: exit: use EXIT_FAILURE intead of 1

2022-07-29 Thread Hiltjo Posthuma
On Thu, Jul 28, 2022 at 07:32:54PM -0500, explosion0men...@gmail.com wrote: > From: explosion-mental > > stdlib.h is included anyway. > --- > util.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/util.c b/util.c > index fe044fc..e03ec21 100644 > --- a/util.c > +++

Re: [hackers] [dwm][PATCH] do not call signal-unsafe function inside sighanlder

2022-07-19 Thread Hiltjo Posthuma
On Tue, Jul 19, 2022 at 12:05:48AM +0200, François-Xavier Carton wrote: > On Thu, Jul 14, 2022 at 07:26:40AM +0600, NRK wrote: > > die() calls vprintf, fputc and exit; none of these are > > async-signal-safe, see `man 7 signal-safety`. > > --- > > dwm.c | 4 ++-- > > 1 file changed, 2

Re: [hackers] [dwm][PATCH] do not call signal-unsafe function inside sighanlder

2022-07-15 Thread Hiltjo Posthuma
On Thu, Jul 14, 2022 at 07:26:40AM +0600, NRK wrote: > die() calls vprintf, fputc and exit; none of these are > async-signal-safe, see `man 7 signal-safety`. > --- > dwm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/dwm.c b/dwm.c > index 5646a5c..8358fb0 100644 >

Re: [hackers] [sent] [PATCH 3/3] Makefile: config.mk: Improve Makefile and config.mk

2022-06-26 Thread Hiltjo Posthuma
On Sun, Jun 26, 2022 at 11:07:52AM +, Tom Schwindl wrote: > Let the Makefile be a bit more verbose and remove unnecessary extensions > and flags in config.mk. > --- > Makefile | 37 +++-- > config.mk | 18 -- > 2 files changed, 27

Re: [hackers] [st][PATCH] support COLORTERM env variable

2022-05-23 Thread Hiltjo Posthuma
On Mon, May 23, 2022 at 06:39:22PM +0200, Mikau wrote: > On May 23, 2022 10:21:39 AM GMT+02:00, Hiltjo Posthuma > wrote: > >On Sun, May 22, 2022 at 04:22:54PM +0300, Otto Modinos wrote: > >> Several programs and terminal emulators (see links further down), are >

Re: [hackers] [st][PATCH] support COLORTERM env variable

2022-05-23 Thread Hiltjo Posthuma
On Sun, May 22, 2022 at 04:22:54PM +0300, Otto Modinos wrote: > Several programs and terminal emulators (see links further down), are > using this variable to indicate truecolor support. > > https://github.com/termstandard/colors > https://gitlab.com/gnachman/iterm2/-/issues/5294 >

Re: [hackers] [dwm|dmenu|st][PATCH] strip the installed binary

2022-05-02 Thread Hiltjo Posthuma
On Mon, May 02, 2022 at 01:48:05PM +0200, Quentin Rameau wrote: > Hi Hiltjo, > > > I don't like this. > > > > I'd rather have it so the Makefile respects the system or package system > > CFLAGS > > and LDFLAGS by default. Then someone can do: make CFLAGS="-Os" LDFLAGS="-s" > > etc. > > > >

Re: [hackers] [dwm|dmenu|st][PATCH] strip the installed binary

2022-05-02 Thread Hiltjo Posthuma
On Mon, May 02, 2022 at 02:46:27PM +0600, NRK wrote: > Hi, > > Was wondering why most suckless program doesn't seem to strip the > installed binary. strip (1p) is specified by POSIX so it should be > portable. > > I noticed the binary size dropping a fair bit after stripping; the > following

Re: [hackers] [dwm][patch] config.mk patch for OpenBSD

2022-05-01 Thread Hiltjo Posthuma
On Sun, May 01, 2022 at 01:53:47PM -0400, fo...@dnmx.org wrote: > :D I am so glad that I could have helped, and do it 3 times at once, hah! > > You have made my day, for I have contributed to something else again :) > Have a nice day > - fossy. > no u :P > > > On Sun, May 01, 2022 at

Re: [hackers] [dwm][patch] config.mk patch for OpenBSD

2022-05-01 Thread Hiltjo Posthuma
On Sun, May 01, 2022 at 10:33:53AM -0400, fo...@dnmx.org wrote: > Hello there, fellow hackers! > > Here's a patch for the config.mk (attached)! > I apologize for not sending an e-mail trough git. > > Have a nice day, > OpenBSD user. Thanks, also added this comment for dmenu and st. -- Kind

Re: [hackers] [dmenu] fix incorrect comment, math is hard || Hiltjo Posthuma

2022-05-01 Thread Hiltjo Posthuma
On Sun, May 01, 2022 at 02:08:58PM +0600, NRK wrote: > Hi Quentin, > > On Sat, Apr 30, 2022 at 05:07:32PM +0200, Quentin Rameau wrote: > > - inputw = mw / 3; /* input width: ~33% of monitor width */ > > + inputw = mw / 3; /* input width: ~33.333% of monitor width */ > > You tried. > > diff

Re: [hackers] [dmenu] inputw: improve correctness and startup performance, by NRK || Hiltjo Posthuma

2022-04-30 Thread Hiltjo Posthuma
On Sat, Apr 30, 2022 at 10:45:09AM +0600, NRK wrote: > On Fri, Apr 29, 2022 at 08:19:20PM +0200, g...@suckless.org wrote: > > commit e1e1de7b3b8399cba90ddca9613f837b2dbef7b9 > > Author: Hiltjo Posthuma > > AuthorDate: Fri Apr 29 20:15:48 2022 +0200 > >

Re: [hackers] [dmenu] inputw: improve correctness and startup performance || NRK

2022-04-29 Thread Hiltjo Posthuma
On Fri, Apr 29, 2022 at 08:53:38AM +0600, NRK wrote: > On Fri, Mar 25, 2022 at 10:57:42PM +0100, g...@suckless.org wrote: > > commit 77526f756e23e362081ac807521f901f2e5cd5e6 > > Author: NRK > > AuthorDate: Thu Mar 24 00:37:55 2022 +0600 > > Commit: Hiltjo Posthu

Re: [hackers] [dmenu] inputw: improve correctness and startup performance || NRK

2022-04-29 Thread Hiltjo Posthuma
On Fri, Apr 29, 2022 at 08:11:46AM +0200, Laslo Hunhold wrote: > On Fri, 29 Apr 2022 08:53:38 +0600 > NRK wrote: > > Dear NRK, > > > 2. (Incorrectly) assume `more bytes == wider string`, which is not > > correct thanks to unicode. > > > > 3. Try to get the width of the unicode code-point. I've

Re: [hackers] [dwm][PATCH] manage: Make sure c->isfixed is applied before floating checks

2022-04-26 Thread Hiltjo Posthuma
On Tue, Apr 26, 2022 at 09:42:23AM +0100, Chris Down wrote: > Commit 8806b6e23793 ("manage: propertynotify: Reduce cost of unused size > hints") mistakenly removed an early size hints update that's needed to > populate c->isfixed for floating checks at manage() time. This resulted > in fixed (size

Re: [hackers] [tabbed][PATCH] Removes recursion while mouse is over window

2022-04-19 Thread Hiltjo Posthuma
ack on to get text boxes to work, so I think we > should just stop it from calling itself rather than not calling it > altogether. (could implement something like a timeout to prevent > focusin from being called too often) > > On Tue, 19 Apr 2022 at 10:42, Hiltjo Posthuma wrote: >

Re: [hackers] [st][PATCH v2] code-golfing: cleanup osc color related code

2022-04-19 Thread Hiltjo Posthuma
On Tue, Apr 19, 2022 at 08:06:19AM +0600, NRK wrote: > Hi, > > Any remaining problem with the patch? > > Assuming it just fell off the radar :) > > - NRK > Hi, Thanks for the reminder and the patch. It indeed fell off my radar, sorry about that. I pushed the patch now, -- Kind regards,

Re: [hackers] [tabbed][PATCH] Removes recursion while mouse is over window

2022-04-19 Thread Hiltjo Posthuma
On Mon, Apr 18, 2022 at 05:12:35PM +0100, bolshoytoster wrote: > In the focusin function, it calls focus, which calls > XSetInputFocus, which sends the focusin event. > > This can cause consistent ~90% cpu usage fo Xorg while the mouse > is over the window. > > This patch just gets rid of the

Re: [hackers] [dwm][PATCH] Update monitor positions also on removal

2022-04-16 Thread Hiltjo Posthuma
On Sun, Apr 10, 2022 at 09:16:43AM +0300, Santtu Lakkala wrote: > On 9.4.2022 13.51, Hiltjo Posthuma wrote: > > I've heard similar reports with monitor plugging and unplugging not working > > nicely. > > > > Can someone test this patch and report back these condit

Re: [hackers] [dwm][PATCH] Update monitor positions also on removal

2022-04-09 Thread Hiltjo Posthuma
On Mon, Feb 21, 2022 at 04:58:28PM +0200, Santtu Lakkala wrote: > When monitors are removed, the coordinates of existing monitors may > change, if the removed monitors had smaller coordinates than the > remaining ones. > > Remove special case handling so that the same update-if-necessary loop >

Re: [hackers] [libsl|dmenu][PATCH v2] Fix truncation issues and improve performance

2022-03-25 Thread Hiltjo Posthuma
On Fri, Mar 25, 2022 at 03:34:29PM +0600, NRK wrote: > Hi, > > Fixed a couple bugs/issues with the previous patches and attached the > amended ones. I'm confident that these patches shouldn't have any > remaining logic issues, but feel free to point them out in case there is. > > Some notable

Re: [hackers] [dmenu][PATCHes] Fix truncation issues and improve performance

2022-03-23 Thread Hiltjo Posthuma
On Wed, Mar 23, 2022 at 12:26:24AM +0600, NRK wrote: > On Tue, Mar 22, 2022 at 06:06:30PM +0100, Stein Gunnar Bakkeby wrote: > > With the first patch the text is still allowed to bleed into the right hand > > side padding as long as it fits. > > > > I worked around that by reducing w with 2 *

Re: [hackers] [st][PATCH v2] code-golfing: cleanup osc color related code

2022-03-20 Thread Hiltjo Posthuma
On Sun, Mar 20, 2022 at 05:36:04PM +0600, NRK wrote: > * adds missing function prototype > * move xgetcolor() prototype to win.h (that's where all the other x.c > func prototype seems to be declared at). > * reduces code duplication for osc 10/11/12 > * unify osc_color_response() and

Re: [hackers] [st][PATCH] base64_digits: reduce scope, implicit zero, +1 size

2022-03-18 Thread Hiltjo Posthuma
On Fri, Mar 18, 2022 at 05:03:34PM +0600, NRK wrote: > the array is not accessed outside of base64dec() so it makes sense to > limit it's scope to the related function. the static-storage duration of > the array is kept intact. > > this also removes unnecessary explicit zeroing from the start and

Re: [hackers] [st][PATCH] rm unnecessary explicit zeroing

2022-03-18 Thread Hiltjo Posthuma
On Fri, Mar 18, 2022 at 02:11:27PM +0600, NRK wrote: > On Fri, Mar 18, 2022 at 12:40:00AM +0100, Roberto E. Vargas Caballero wrote: > > Uh, I didn't realize about it, I just saw that having 255 entries was > > wrong ^^!!!. > > I think the best approach is to split the commit in two and

  1   2   3   4   5   >