[dwm] place floating windows at cardinal points

From: Riccardo Murri <riccardo.murri_AT_gmail.com>
Date: Wed, 9 May 2007 17:29:08 +0200


here's part 2 in my attempts to porting larswm features I like to dwm.

Attached are two (independent) patches against dwm-4.0 sources, adding
convenience functions:

  - the "place" patch adds a `place()` function that can be used to
    instantly move a floating window to a "cardinal point" of the
    window area.

    There's a bug with this: the moved window will at times loose
    focus. I could not identify the culprit, as the bug seems to
    manifest itself at random... Any clue will be appreciated :-)

  - the "switchto" patch adds `focusnamed()`/`zoomnamed()` functions
    that will focus (resp. zoom) a client window selected with a
    "class:instance:title" regex (like the one used in the tags
    rules). Repeatedly calling the same function will cycle through
    all matching windows. If no window matches the given regex, a
    command is spawned to create it.

    For instance, the key assignment::

      { MODKEY|ControlMask|ShiftMask, XK_Return, zoomnamed,
"XTerm:xterm:.*:xterm" },

    will zoom the XTerm window which comes last in the window list, or
    spawn a new `xterm` if no XTerm window is currently open.

    (I understand that one can already do this with tag+spawn, but I
    find the one-key solution more comfortable.)


Received on Wed May 09 2007 - 17:29:10 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:41:07 UTC