Re: [dev] [dwm] execwm(), ie, self?

From: Steffen Nurpmeso <steffen_AT_sdaoden.eu>
Date: Sun, 08 Sep 2024 03:55:43 +0200

Steffen Nurpmeso wrote in
 <20240907014632.jhrnO-iG_AT_steffen%sdaoden.eu>:
 ...
 |What do you think of another accessible function, like (draft)
 ...
 |+execwm(const Arg *arg)
 |+{
 |+ setsid();
 |+ execvp(((char **)arg->v)[0], (char **)arg->v);
 |+ fprintf(stderr, "dwm: execvp wm '%s' failed:", ((char **)arg->v)[0]);

 |+ execvp(xargv[0], xargv);
 |+ die("dwm: re-exec failed:");

Ok maybe these can be totally scratched as well as xargv.
(And maybe spawn() could be reordered, so that it could call this
XYexec() instead, saving some bytes, likely.)
But other than that i have

  {MODKEY|ControlMask, XK_Escape, execwm, {.v = dwmcmd}},

and i like it (myself).

 |+}

 ...
 --End of <20240907014632.jhrnO-iG_AT_steffen%sdaoden.eu>

Btw despite possible misunderstandings and total lack of
experience i have

  {MODKEY|ControlMask,XK_numbersign,incnmaster,{.i=+1}},
  {MODKEY|ControlMask|ShiftMask,XK_numbersign,incnmaster,{.i=-1}},

and find that if typing this, with two windows open, several times
in advance the processing seems to stop, and with a delay it then
happens once again, even after "ten additional keypresses".

And also, it is mysterious, as i cannot imagine anything, but
i also have

  {MODKEY|ControlMask,XK_plus,setmfact,{.f=+0.05}},
  {MODKEY|ControlMask,XK_minus,setmfact,{.f=-0.05}},

and if that comes into play (two windows) my tmux session in that
single st only sends the resize event to the active terminal,
which i have never encountered in cwm, where after a window resize
all terminals get over with the correct size .. then again we have
passed say a dozen execwm via cwm and dwm, so maybe .. i do not
know. (Btw bar on/off has the same effect, i have done "set
lines=xxy" several times in vim this evening.) Well let's see,
i think its pretty cool and i will surely get used to dwm! Thanks
for it!! (Now i only have to hack in support for different status
colours in order to make my status-line.sh truly work for dwm as
opposed to in the tmux status-right, ie, dependent on load
temperature etc this may go green,yellow,red at times.)

Thanks, ciao, and a nice Sunday i wish,

--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)
Received on Sun Sep 08 2024 - 03:55:43 CEST

This archive was generated by hypermail 2.3.0 : Sun Sep 08 2024 - 04:00:08 CEST