Re: [dwm] using slock from d

From: Tuncer Ayaz <tuncer.ayaz_AT_gmail.com>
Date: Thu, 1 Feb 2007 17:45:28 +0100

On 2/1/07, Anselm R. Garbe <arg_AT_suckless.org> wrote:
> On Thu, Feb 01, 2007 at 04:51:43PM +0100, Tuncer Ayaz wrote:
> > On 2/1/07, Markus Sonderegger <msonderegger_AT_aon.at> wrote:
> > >On 14:01 Thu 01 Feb , Anselm R. Garbe wrote:
> > >> On Thu, Feb 01, 2007 at 01:46:53PM +0100, Tuncer Ayaz wrote:
> > >> > On 2/1/07, Antoni Grzymala <antoni_AT_chopin.edu.pl> wrote:
> > >> > >Tako rzecze Tuncer Ayaz (w e-mailu datowanym 2007-02-01, 10:56):
> > >> > >
> > >> > >> I'm not sure it's the same problem Alex Elide had
> > >> > >> back in October but I'm not able to start slock
> > >> > >> from neither dwm's internal keygrabber nor an
> > >> > >> external one. Actually IIRC it may be so that I
> > >> > >> managed to start it once with an external grabber
> > >> > >> with dwm also running after pressing the key combo
> > >> > >> several times but repeating the key combo all the
> > >> > >> time does nothing else the seemingly refresh or
> > >> > >> redraw the screen.
> > >> > >>
> > >> > >> I tried both with or without "exec "
> > >> > >> { Mod4Mask, XK_l, spawn, { .cmd = "exec slock" } }, \
> > >> > >> { Mod4Mask, XK_l, spawn, { .cmd = "slock" } }, \
> > >> > >
> > >> > >Hi,
> > >> > >
> > >> > >I had a similar problem with xtrlock some time ago, arg suggested
> > >that I
> > >> > >add a pause before the command. The following works for me:
> > >> > >
> > >> > >{ MODKEY|ControlMask, XK_l, spawn, { .cmd = "sleep 1 && exec
> > >xtrlock"
> > >> > >} }, \
> > >> >
> > >> > thanks that works.
> > >>
> > >> Well I pushed a patch of slock using longer usleep() pauses to
> > >> hg tip.
> > >> Please tell me if this works without sleep 1.
> > >
> > >No it doesn't work for me, without sleep 1.
> >
> > Same here, although the effect which I thought was looking
> > like an X screen refresh changed slightly :D.
>
> Would be great if someone could recheck increasing the argument
> to usleep(100000) and at which number it works as expected.
>
> Thanks in advance,
> --
> Anselm R. Garbe >< http://suckless.org/~arg/ >< GPG key: 0D73F361
>
>

well as the following also does not work, I'm not sure
it is fixable by increasing this specific delay.

$ hg diff
diff -r 540ebd7b3d7b slock.c
--- a/slock.c Thu Feb 01 13:52:36 2007 +0100
+++ b/slock.c Thu Feb 01 17:43:33 2007 +0100
@@ -92,7 +92,7 @@ main(int argc, char **argv) {
        len = 10;
        for(len = 10; len && (XGrabKeyboard(dpy, RootWindow(dpy,
screen), True, GrabModeAsync,
                GrabModeAsync, CurrentTime) != GrabSuccess); len--)
- usleep(10000);
+ usleep(1000000);
        running = running && (len > 0);
        len = 0;
        XMapRaised(dpy, w);
Received on Thu Feb 01 2007 - 17:45:29 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:35:45 UTC