Re: [dev] [dwm] Why should (or shouldn't) dwm have a spawn function?

From: Mateusz Okulus <>
Date: Tue, 29 Jun 2021 13:48:51 +0200

On 21/06/29 01:16AM, wrote:
> The existence of the spawn function in dwm surprises me. Wouldn't it
> be more consistent with Suckless' values (simplicity, minimalism,
> modularity) if the job of spawning commands were relegated to a hotkey
> daemon, such as xbindkeys or sxhkd?

I think you fell for the trap of thinking that more split programs means
that the whole setup is simpler. That's not always the case.

spawn is just simple wrapper of standard fork into execvp. You also get
SHCMD which is also very simple and avoids using
{ .v = { "cmd", (char *)NULL } all the time.

sxhkd complicates the setup with little additional benefit. The dwm
specific keybindings need to stay in config anyway. The only keybindings
you could move are the spawn one as you say. What do you get from moving
them to sxhkd? You have slightly simpler syntax (little benefit) and if
you switch wm you don't need to switch these keybindings, they work in
every x wm (again little benefit, why are you switching wms so often?)

I'm open to arguments why using sxhkd would make things simpler and


Received on Tue Jun 29 2021 - 13:48:51 CEST

This archive was generated by hypermail 2.3.0 : Tue Jun 29 2021 - 15:48:07 CEST