Commit Graph

1764 Commits

Author SHA1 Message Date
97b5eb083f more window rules 2025-11-27 09:46:20 +10:30
9c9f96d87b minor changes to class names/ window rules 2025-11-27 08:53:49 +10:30
b7effec665 calcurse 2025-07-22 11:23:00 +09:30
abb199c0f4 cleen 2025-06-02 15:38:04 +09:30
ae491aa5ab bit better, double chords cause issues 2025-05-26 21:58:46 +09:30
e079e77686 minor change trial 2025-05-26 16:10:10 +09:30
c3100c3df3 updates, updates, updates 2025-05-26 10:46:53 +09:30
0b57caae75 updates again, need to specify number of chords 2025-05-10 10:43:47 +09:30
6cb4156756 new things, thanks luke 2025-05-03 22:01:57 +09:30
653c276b01 aaah, now I understand 2025-05-03 21:01:23 +09:30
d391b7c2e6 merged and updated config 2025-04-23 13:31:18 +09:30
5fce79e312 merged keychord 2025-04-19 20:56:25 +09:30
b5ed12048d merged statuscmd 2025-04-19 20:25:02 +09:30
d1e5974129 patched uselessgap 2025-04-19 18:43:18 +09:30
8f246910f3 patched shift-tools 2025-04-19 18:39:39 +09:30
2580767003 patched restartsig 2025-04-19 18:38:59 +09:30
2e6272f7f1 patched pertag 2025-04-19 18:38:37 +09:30
fd874e07dc patched movestack 2025-04-19 18:37:48 +09:30
fa39b4765a merged fullscreen 2025-04-19 18:34:55 +09:30
2066e3b7cd merged attachtop 2025-04-19 18:34:30 +09:30
e7a6916cb7 patched fullscreen 2025-04-19 15:59:24 +09:30
ad9b27a15b added patch file 2025-04-19 15:58:55 +09:30
0c9f5bba6b patched attachtop 2025-04-19 15:57:50 +09:30
7f2389a854 added patch file 2025-04-19 15:06:48 +09:30
71640d5f89 patched movestack 2025-04-19 15:05:49 +09:30
206a85b47b added patch file 2025-04-19 15:03:54 +09:30
7c4f999049 patched uselessgap 2025-04-19 15:02:35 +09:30
1475f7d4eb added patch file 2025-04-19 15:01:15 +09:30
76a99433ed patched restartsig 2025-04-19 14:57:03 +09:30
d73b040126 added patch file 2025-04-19 14:54:54 +09:30
1629117105 patched pertag 2025-04-19 14:53:47 +09:30
da851ad386 added patch file 2025-04-19 14:53:31 +09:30
c7119cafbc shift-tools patched? 2025-04-18 21:57:06 +09:30
588274b548 patch file 2025-04-18 21:54:52 +09:30
1aa2f720a6 patched statuscmd 2025-04-18 21:48:01 +09:30
32955c01e2 don't forget to fix keychain to keychord changes 2025-04-18 21:45:54 +09:30
7f3addd652 forgot to add patch file 2025-04-18 21:43:20 +09:30
8ff05305b4 patched keychord, bye bye keychain :( 2025-04-18 21:39:15 +09:30
ab531786a1 added my default config file, might need tweaking 2025-04-18 21:22:57 +09:30
Raymond Cole
cfb8627a80 Avoid unsigned integer underflow in drw_text() 2024-10-30 13:02:17 +01:00
Hiltjo Posthuma
fcb2476b69 util.c: output function might override errno and thus affect perror()
Original patch by Raymond Cole with some modifications, thanks!
2024-10-27 20:10:07 +01:00
Hiltjo Posthuma
8933ebcf50 sync drw.{c,h} from dmenu
- drw: minor improvement to the nomatches cache
- overhaul utf8decoding and render invalid utf8 sequences as U+FFFD.

Thanks NRK for these improvements!
2024-10-05 13:06:08 +02:00
Pontus Stenetorp
5687f46964 Add missing void to updateclientlist definition
Caught by -pedantic implying -Wstrict-prototypes for OpenBSD's 16.0.6 Clang.
2024-06-08 18:21:00 +02:00
Hiltjo Posthuma
061e9fe9a7 bump version to 6.5 2024-03-19 12:13:16 +01:00
Hiltjo Posthuma
9f8855343c Makefile: remove the options target
The Makefile used to suppress output (by using @), so this target made sense at
the time.

But the Makefile should be simple and make debugging with less abstractions or
fancy printing.  The Makefile was made verbose and doesn't hide the build
output, so remove this target.

Prompted by a question on the mailing list about the options target.
2023-09-22 15:13:29 +02:00
Hiltjo Posthuma
e81f17d4c1 restore SIGCHLD sighandler to default before spawning a program
From sigaction(2):
A child created via fork(2) inherits a copy of its parent's signal dispositions.
During an execve(2), the dispositions of handled signals are reset to the default;
the dispositions of ignored signals are left unchanged.

This refused to start directly some programs from configuring in config.h:

static Key keys[] = {
	MODKEY,                       XK_o,      spawn,          {.v = cmd } },
};

Some reported programs that didn't start were: mpv, anki, dmenu_extended.

Reported by pfx.
Initial patch suggestion by Storkman.
2023-04-09 12:37:14 +02:00
NRK
348f6559ab config.mk: update to _XOPEN_SOURCE=700L
SA_NOCLDWAIT is marked as XSI in the posix spec [0] and FreeBSD and NetBSD
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 it also unlocks the X/Open System
Interfaces.

[0]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html#tag_13_42
[1]: https://lists.suckless.org/dev/2302/35111.html

Tested on:
* NetBSD 9.3 (fixed).
* FreeBSD 13 (fixed).
* Void Linux musl.
* Void Linux glibc.
* OpenBSD 7.2 (stable).
* Slackware 11.

Reported-by: beastie <pufferfish@riseup.net>
2023-02-17 15:27:34 +01:00
Chris Down
712d6639ff Use sigaction(SA_NOCLDWAIT) for SIGCHLD handling
signal() semantics are pretty unclearly specified. For example, depending on OS
kernel and libc, the handler may be returned to SIG_DFL (hence the inner call
to read the signal handler). Moving to sigaction() means the behaviour is
consistently defined.

Using SA_NOCLDWAIT also allows us to avoid calling the non-reentrant function
die() in the handler.

Some addditional notes for archival purposes:

* NRK pointed out errno of waitpid could also theoretically get clobbered.
* The original patch was iterated on and modified by NRK and Hiltjo:
  * SIG_DFL was changed to SIG_IGN, this is required, atleast on older systems
    such as tested on Slackware 11.
  * signals are not blocked using sigprocmask, because in theory it would
    briefly for example also ignore a SIGTERM signal. It is OK if waitpid() is (in
    theory interrupted).

POSIX reference:
"Consequences of Process Termination":
https://pubs.opengroup.org/onlinepubs/9699919799/functions/_Exit.html#tag_16_01_03_01
2023-01-28 13:34:43 +01:00
Chris Down
89f9905714 grabkeys: Avoid missing events when a keysym maps to multiple keycodes
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:

    % xmodmap -pke | grep XF86AudioPlay
    keycode 172 = XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause
    keycode 208 = XF86AudioPlay NoSymbol XF86AudioPlay
    keycode 215 = XF86AudioPlay NoSymbol XF86AudioPlay

This is a problem because the current code only grabs a single one of
these keycodes, which means that events for any other keycode also
mapping to the bound keysym will not be handled by dwm. In my case, this
means that binding XF86AudioPlay does the right thing and correctly
handles my keyboard's keys, but does nothing on my headphones. I'm not
the only person affected by this, there are other reports[0].

In order to fix this, we look at the mappings between keycodes and
keysyms at grabkeys() time and pick out all matching keycodes rather
than just the first one. The keypress() side of this doesn't need any
changes because the keycode gets converted back to a canonical keysym
before any action is taken.

0: https://github.com/cdown/dwm/issues/11
2022-12-07 23:06:26 +01:00
Hiltjo Posthuma
ba56fe9fea Revert "Remove dmenumon variable"
This reverts commit c2b748e793.

Revert back this change. It seems to not be an edge-case anymore since
multiple users have asked about this new behaviour now.
2022-10-28 16:37:56 +02:00