Squib of the day: walk through workspaces

LightswitchI don’t know why switching continues to be a source of squibs, but there it is.  In GNOME bug 570817 someone is suggesting a way to walk through workspaces (presumably only populated ones, but that’s not clear) in the same way that hitting and immediately releasing alt-tab moves you to the next window without regard to where it is.

Of course again we could solve this simply with an external script, and I’m wondering whether there should be a Bugzilla status for RESOLVED CANFIXWITHASCRIPT.

More seriously, perhaps there should be a collection of these scripts and a master script which listed them all in a dialogue box and modified the user’s GConf settings according to which ones were turned on.  (I wonder whether the control-center people would object to having this in an “Advanced” button somewhere, or whether that’s too bells-and-whistly.)

Update: Since the script was so simple, I spent twenty minutes writing it and closed the bug.  I think this demonstrates that we need a Perl module called X11::Protocol::Extended which knows about the EWMH, so these scripts are even easier to write.  Maybe I’ll write it.

Photo © Heated Ground Photography, cc-by-nd.

Squib of the day: extend plugin possibilities

For once, this isn’t about an existing bug– well, there’s a tenuous connection to GNOME bug 311428.

Several of the recent squibs have resulted in the observation that an external script could be made to do the work.  This is true for responding to keypresses, but for problems such as performing some action whenever a window opens it gets a bit harder– the external script must run all the time and either monitor X events or, as devilspie does, get libwnck to monitor X events on its behalf.

It might be a better idea if Metacity (or libwnck) could be given a list of commands to run when windows open, and possibly on other events, to make writing plugins easier.

The (fast!) default would be the empty list, of course.

Another event which it would make sense to be able to tie plugins into is window role change, so that a window-matching script could learn automatically.

It would also be sensible to allow programs to be executed when mouse buttons other than the main three were pressed (so you could launch an Exposé clone by pressing the shoulder button, for example).

Photo © Katie Sutton, cc-by-nc-sa.

Squib of the day: Remove alt-tab entirely

Even super heroes need a day offIn GNOME bug 570079, someone suggests throwing away alt-tab entirely to replace it with an external program, specifically superswitcher.

Of course, you can already do this by disabling the ordinary alt-tab action and then assigning superswitcher to be one of the custom commands, but I think they want it shipped that way by default. I suppose it might be interesting to be able to have alt-tab in a separate process, if you wanted to save memory and your computer was fast enough that it wasn’t too slow to start up.

Photo © kagey_b, cc-by-nc-nd.

You can switch in a direction!

BridgeWhen I posted yesterday’s squib, I really didn’t expect six people to say they’d use it. Someone plaintively left a message on the bug saying “Please make it possible for devilspie to add this feature!” Well, it is possible for devilspie or any other addon to add this feature, and for that reason it’s not a big difficulty to write it as an external script.  As an added bonus, it should work with Compiz or KWin or any other EWMH-aware window manager.

To play with the script:

  1. Download the current version from GNOME bug 152661.
  2. Put it in your path as metacity-direction.
  3. Install X11::Protocol by typing:
    sudo cpan X11::Protocol
  4. Open gconf-editor and set /apps/metacity/keybinding_commands/command_n, where n is any set of four unused values, to:
    metacity-direction e
    metacity-direction s
    metacity-direction w
    metacity-direction n
  5. Set /apps/metacity/global_keybindings/run_command_n to an appropriate set of values, like “<Shift><Alt>Right”, etc.
  6. Enjoy.

The algorithm is supposed to be the same as fvwm’s, but if you have suggestions for tweaking it, let me know.  The program should also demonstrate how to do fun EWMH things from Perl.

Photo (c) Katie Sutton, cc-by-nc-sa.

Squib of the day: prefix system for keybindings

Old ad, with Prefixes for phone numbersIn GNOME bug 310842 the suggestion is raised that there should be an option to require all keybindings to be prefixed with a particular keystroke, to minimise the number of keystrokes which can’t be used by applications– there would be only one keystroke, the prefix, that was globally grabbed.  Such a system would be reminiscent of ctrl-A in GNU Screen or ctrl-T in ratpoison.  The default would be to keep things the way they are, of course.

It’s certainly doable, but would this be of use to anyone in the real world?  Do any of you fancy justifying this idea?

Photo © Lauren, cc-by-nc-nd.

Squib of the day: move in a direction

ma quando sono gentili le bobbiesIn GNOME bug 152661 someone is asking for the ability to move in a particular direction from a given window (as opposed to from a given workspace).  So you could move to the closest window to the right of the focussed window, for example.  Apparently FVWM has this feature.  (I assume this would be an unbound keybinding by default.)

I really don’t see why this feature would be useful to anyone.  Would anyone care to try to justify its inclusion before I close the bug?

Photo © lavalen, cc-by-sa.

Squib of the day: speed up alt-tab under compositing

Light Switch ComplicatorGNOME bug 504729 suggests that switching with alt-tab, while using compositing, is too slow. This is because all the images of the windows are scaled on the client side before the window is displayed.

There are two possible answers to this problem.

Firstly, we can check for key release while scaling is happening, and if one is received, abort scaling and simply switch to the next application.

Secondly, scaling can be faster if it’s done server-side.  This is possible but apparently there’s a common bug that it hits.  Fixing this would also mean that we got to have animated previews easily.

I think the first solution should be added in any case, and the second should be added when it’s possible.  I can add the first solution; I’m not sure I know enough to fix the second.

Photo © L. Marie, cc-by.

Squib of the day: Exposé

ExposeIn GNOME bug 502491 someone is asking for an effect like Exposé on OS X.  Iain, who wrote the compositor and ought to know, believes it would be better done as a separate program.  There was an attempt to do this a while back, called Expocity, but nothing much came of it.  Does this mean the bug is INVALID?  Should the external program exist?  Anyone fancy doing it?

Includes the memorable exchange:
“Every time I propose an enhancement, you say ‘go for it’.  What are you doing?”
“I’m cooking my dinner.  What are you doing?”

If it was a separate program, it could be activated by a mouse button or a keybinding in the same way that, say, Print Screen is currently activated.  The program could move windows about using the EWMH, but I don’t see how an external utility could tell the compositor to scale the contents of windows down and back again.  Iain, can you throw me a clue? Update: Thanks.

Someone said yesterday in the discussion on animated previews in the alt-tab switcher that an Exposé-like effect would be good for everything that animated previews would, and more.

Photo © Underpuppy, cc-by-nd-sa.

Squib of the day: Live previews in alt-tab

True to my promise, here’s the first bug/squib of the day.

In GNOME bug 567757 someone is asking for live previews in the alt-tab window.  I can’t think why this would actually be useful, as opposed to pretty, and it sounds like a lot of work and a source of new bugs.  I am therefore minded to say no.  Can anyone think of why it might be worth the trouble?

Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported.