fix microsleep and add config option; update manual; v1.4.1
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAmPTE9YACgkQO3+8IhRO Y5h4TA//aaXBKyJzqmDdiVfqWoXzKbI6exEvSnqod561KwVxi+KzB2uTdtnT6wya UBPuHmgvfAH9NUes1MBGpw3JMmxxXrAkSFmulzf/TxBps+Ms0Ex1tGFT93QAulHh JKdHeq0047b4hGTP4pyLkuJodeRbiQsSVVgyyuDRrxGFN+KhP3ZWDggQ/PuoJbPR XZn2bYCAA9t7u0hfyvJxeyi786UBx65uN/qHz91TIoL/jUxUgZgvFiSVnMpVsa6u DRioUZV2/8Yzgk/qdhMDyVi5iXK5vc9U04zkxNmSHGoV51Yrhm3u1WpL3KkIX5We b/rlFEPOiYPvTG9iO/Sv7UjY+egL1OZH66hxfS1pbRx8w75e5grbslHDtBFLTmqT itpXVzNDTpcsqv6ZPKYRYn1ZBUcNEI5Izx7zMGK6CxWp7pMpoiMc58jRr/N0tnkB LsMjrx/b5Y/GTM/GCaphwOX7CFaNkKxavSeMWQE6jQ95NUxNuQAcj0Iq3Mi4nb4F Q4K/Ffa9i0dqqCXkvrOEcgwBiKqLhaRnzEivA1/Rnw7zaW9Buv6jAgOKsYcpXhdk Omwb6ko5lP5tZYwfFVGf3Jnc+Np5R/KBdsGqYlQ3/g1FFOFrnFZCZI9jVndxbm8E Fp9Vn7o0IUxIb1S1cUGmCRRONDQVI3FJuhM9VFUmkX0eDo7Oaa8= =qLGr -----END PGP SIGNATURE-----
6 files changed,
33 insertions(+),
28 deletions(-)
M
config.def.h
→
config.def.h
@@ -54,6 +54,7 @@ #define TRANSPARENTLIST { \
"Alacritty", \ "kate", \ "acme", \ + "st-256color",\ 0 \ }@@ -101,6 +102,12 @@ /************
* BEHAVIOR * [Everything in this section is optional unless otherwise noted] ***********/ +/* Microseconds to wait before centering terminal windows spawned by keyboard; + * if your system is wicked fast you can lower this; if very old/slow, you may + * have to raise it. + */ +#define MICROSLEEP_DELAY 100000 + /* This sets the size ratio for windows spawned via keyboard or * center-snapped; CENTERNUM should be >= 2, so use 2/4 instead of 1/2 */@@ -146,6 +153,7 @@
#define AUTOSTICK {\ "XOsview", \ "XClock", \ + "xneralie", \ 0 \ }@@ -156,6 +164,7 @@ * terminating lines!
*/ #define TERMINALS {\ + "st-256color", \ "term", \ "Term", \ "xvt", \
M
event.c
→
event.c
@@ -18,6 +18,10 @@ #include "dat.h"
#include "fns.h" #include "patchlevel.h" +#ifndef MICROSLEEP_DELAY +#define MICROSLEEP_DELAY 100000 +#endif + void mainloop(int shape_event) { static XEvent ev; static Client* c;@@ -212,6 +216,9 @@
void mapreq(XMapRequestEvent* e) { Client* c; int i; + XRRMonitorInfo monitor; + + monitor = monitorinfo[getmonitorbymouse()]; curtime = CurrentTime; c = getclient(e->window, 0);@@ -233,6 +240,15 @@ return;
} } + if (kbLaunch) { + usleep(MICROSLEEP_DELAY); +#ifdef CENTERVMAX + centerclient(c, monitor, 1); +#else + centerclient(c, monitor, 0); +#endif + kbLaunch = 0; + } switch (c->state) { case WithdrawnState: if (c->parent == c->screen->root) {@@ -298,9 +314,6 @@
void newwindow(XCreateWindowEvent* e) { Client* c; ScreenInfo* s; - XRRMonitorInfo monitor; - - monitor = monitorinfo[getmonitorbymouse()]; /* we don't set curtime as nothing here uses it */ if (e->override_redirect)@@ -341,16 +354,6 @@ (unsigned char*)&opacity,
1); } #endif - - if (kbLaunch) { - usleep(100000); -#ifdef CENTERVMAX - centerclient(c, monitor, 1); -#else - centerclient(c, monitor, 0); -#endif - kbLaunch = 0; - } } void destroy(Window w) {
M
ryudo.1
→
ryudo.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "RYUDO" "1" "March 2022" "" "" +.TH "RYUDO" "1" "January 2023" "" "" . .SH "NAME" \fBryudo\fR \- The floatiling window manager that flows@@ -180,10 +180,7 @@ .
.IP "" 0 . .SH "BUGS AND CAVEATS" -Click events don\'t pass through when clicking to activate a window\. -. -.P -Clicking mouse button 2/3 on an inactive window brings up the Button 2/3 Menu instead of focusing the window\. I personally sometimes find this behavior useful\. +Switching very fast back and forth between virtual desktops may cause the window manager to stop managing some windows\. Still looking into why\. . .P Programs that expect to run fullscreen will probably just open in a window the size of whatever resolution they expect to run at\. Depending on the implementation, they may respond well to being maximized or you may have to change your screen resolution manually before doing so\. If the program expects to run at the current screen resolution, the window\-wrangling heuristics should maximize it and you\'ll be golden\. If the window is in override\-redirect mode, it should just run fullscreen without a hitch\.
M
ryudo.1.html
→
ryudo.1.html
@@ -178,9 +178,7 @@
<h2 id="BUGS-AND-CAVEATS">BUGS AND CAVEATS</h2> -<p>Click events don't pass through when clicking to activate a window.</p> - -<p>Clicking mouse button 2/3 on an inactive window brings up the Button 2/3 Menu instead of focusing the window. I personally sometimes find this behavior useful.</p> +<p>Switching very fast back and forth between virtual desktops may cause the window manager to stop managing some windows. Still looking into why.</p> <p>Programs that expect to run fullscreen will probably just open in a window the size of whatever resolution they expect to run at. Depending on the implementation, they may respond well to being maximized or you may have to change your screen resolution manually before doing so. If the program expects to run at the current screen resolution, the window-wrangling heuristics should maximize it and you'll be golden. If the window is in override-redirect mode, it should just run fullscreen without a hitch.</p>@@ -191,8 +189,8 @@
<h2 id="AUTHORS">AUTHORS</h2> <ul> -<li>Derek Stevens <a href="mailto:nilix@nilfm.cc" data-bare-link="true">nilix@nilfm.cc</a></li> -<li>Russ Cox <a href="mailto:rsc@swtch.com" data-bare-link="true">rsc@swtch.com</a></li> +<li>Derek Stevens <a href="mailto:nilix@nilfm.cc" data-bare-link="true">nilix@nilfm.cc</a></li> +<li>Russ Cox <a href="mailto:rsc@swtch.com" data-bare-link="true">rsc@swtch.com</a></li> <li>David Hogan, RIP</li> </ul>@@ -204,7 +202,7 @@
<ol class='man-decor man-foot man foot'> <li class='tl'></li> - <li class='tc'>March 2022</li> + <li class='tc'>January 2023</li> <li class='tr'>ryudo(1)</li> </ol>
M
ryudo.1.md
→
ryudo.1.md
@@ -93,9 +93,7 @@ - `Center/Alternate` (Super + Shift + C): Center the currently active window (alternate geometry preference).
## BUGS AND CAVEATS -Click events don't pass through when clicking to activate a window. - -Clicking mouse button 2/3 on an inactive window brings up the Button 2/3 Menu instead of focusing the window. I personally sometimes find this behavior useful. +Switching very fast back and forth between virtual desktops may cause the window manager to stop managing some windows. Still looking into why. Programs that expect to run fullscreen will probably just open in a window the size of whatever resolution they expect to run at. Depending on the implementation, they may respond well to being maximized or you may have to change your screen resolution manually before doing so. If the program expects to run at the current screen resolution, the window-wrangling heuristics should maximize it and you'll be golden. If the window is in override-redirect mode, it should just run fullscreen without a hitch.