[dev] [dwm] [patch] cycle through focus stack

From: Andreas Amann <amann_AT_physik.tu-berlin.de>
Date: Wed, 7 Nov 2012 22:01:08 +0100

Here a patch which adjusts dwm to my personal taste, but maybe others find
it useful as well.

First, I missed a function in dwm which allows me to quickly go back in the
list of windows in the order in which they were focused. Dwm already records
the focus history, but there was no way to access it explicitly.

The attached patch introduces a function cycleglobal() which goes back and
forth in the recent focus history. Pressing Mod-Ctrl-j a couple of times
now takes you back through your recently focused windows. If you went to
far type Mod-Ctrl-k to go forward again.

The second function cycletiled() is mostly useful in tiled layout.
Essentially Mod-Shift-j now rotates the positions of all windows in tiled
mode clockwise, but leaves the focus in the same spot on the screen. So if you
start with a layout with four windows A B C D as follows (C has focus)

-------------------------------------
| | |
| | B |
| |----------------|
| | |
| A | C* |
| |----------------|
| | |
| | D |
|------------------|----------------|

the result of pressing Mod-Shift-j is

-------------------------------------
| | |
| | C |
| |----------------|
| | |
| B | D* |
| |----------------|
| | |
| | A |
|------------------|----------------|

Now D has focus.
Mod-Shift-k does the opposite.

Andreas


Received on Wed Nov 07 2012 - 22:01:08 CET

This archive was generated by hypermail 2.3.0 : Wed Nov 07 2012 - 22:12:04 CET