On Mon, Jun 28, 2010 at 6:29 AM, Bart Nagel <[email protected]> wrote: > Hi. > > I often use modkey+u to switch to an urgent window, deal with it, then > want to switch back to the previous window I was using. There's a > binding as standard for that -- modkey+tab. That works fine if the > window I was working with and the urgent window are both on the same > screen but not if they were on different screens. > > So for instance I'm typing in vim on screen 1 and I get a message in > Pidgin over on screen 2. It gets its urgent hint set and I notice the > red. I press modkey+u. Focus is now given to the Pidgin window on > screen 2. I type a response and then want to switch back to Pidgin. I > press modkey+tab but instead of switching back to screen 1 and vim I'm > switched to the last window which had focus on screen 2, which might > be anything else. > > Is this a bug or is there some way I can fix up my rc so it works for > any screen? The relevant lines are currently > > awful.key({ modkey, }, "Tab", > function () > awful.client.focus.history.previous() > if client.focus then > client.focus:raise() > end > end), > > Thanks. > > --bart nagel > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > > iEYEARECAAYFAkwoeXAACgkQsVSWnfgMhKs+6wCggEB7guUQGPC8V55+wQj+0iP5 > 1e0An3BUFZu1S7mJsiqGQtjgAXDUgXma > =98XP > -----END PGP SIGNATURE----- > >
Good day, Sorry that this went largely ignored. Probably not low hanging enough fruit for a quick and easy answer :) Anyway, it seems that awesome's built in focussing system seems to be screen dependent. However, it looks like with a beat of teasing, it should be possible to make your use case happen. Just from looking at the docs, my recommendation is: 1) Update your urgent-jumping function to include a call to http://awesome.naquadah.org/doc/api/modules/awful.client.html#focus.history.add 2) Then focus previous should maybe work right :) If that doesn't quite jive, do some variant of this idea but a bit nastier. I.e. have some variable that tracks the last client and screen manually. Use a hook/signal (see wiki Signals) to track this. Then just use focus on the c that you've stored + raise on it. Should hopefully do it. Cheers, -AT -- To unsubscribe, send mail to [email protected].
