[xmonad] Hiding windows, showing desktop
Norbert Zeh
nzeh at cs.dal.ca
Fri Feb 18 16:10:07 CET 2011
Hi folks,
I'm interested in temporarily hiding all the windows on one of my workspaces.
Ideally, I'd also like to restore them to their original state either by
pressing a key again or, even better, as soon as I'm doing something that
affects the current layout (press focusUp key, for example).
So here are my questions:
(1) Is this functionality available in XMonadContrib and I just didn't know
how to look? If so, pointers are appreciated.
(2) If the answer to (1) is no, then I don't mind implementing it, but I'd
appreciate pointers on how to go about it. Here's what I tried so far.
Option 1: In order to support the behaviour that a change of the current
layout should restore the windows, I wrote a layout modifier. It simply ran
"hide" over the windows it gets in the stack passed to it and later restored
them using "reveal". This worked nicely, but it didn't hide floating windows.
The reason, I thought: floating windows are not passed to the layout.
Option 2: To overcome the problem with Option 1, I changed the code so that
the messages to the layout modifier include the *entire* window list of the
current workspace, not only the non-floating ones, and then I handled that
list. The result: nothing changed because, as it turns out, after the layout
is done doing whatever it does, the "windows" function in the core XMonad
applies "reveal" to all floating windows on the current workspace.
Option 3: So I thought this calls for heavier guns. So one thing I tried was
to temporarily replace the window stack of the current workspace with Nothing
and later bring it back. My current code for this doesn't do the right thing
and causes lots of trouble. While some debugging and tweaking and hacking may
get that to work eventually, it just seems too hackish an approach.
So, what do the xmonad gurus say about how one could implement this? With
things like conky running on one's desktop, this seems to be a rather useful
functionality to have.
Cheers,
Norbert
More information about the xmonad
mailing list