[xmonad] Integrating boringWindows and minimize
adam vogt
vogt.adam at gmail.com
Sun Jun 24 19:46:40 CEST 2012
On Fri, Jun 8, 2012 at 9:40 PM, Christopher Howard
<christopher.howard at frigidcode.com> wrote:
> Hi. I use XMonad mostly with the Full layout, and switch between
> applications with the keyboard, but I wanted to be able to minimize
> windows occasionally. The idea is to get them out of the way so I can
> more quickly switch between other windows.
>
> Anyway, I almost got what I wanted with something like so, trying to
> follow online documentation (and guessing at what wasn't clear to me):
>
> code:
> --------
> myLayout = boringWindows (minimize (Full ||| tiled)) ||| tiled
> --------
>
> The minimizing part seems to work fine (minimized windows don't
> display). However, when I switch through the the windows with the
> keyboard, minimized windows apparently are still receiving focus. So,
> for example, if I have three minimized windows, between two regular
> ones, I will have to focus down three times before being switched
> between the two.
>
> (Thank you for your patience. I have to admit it's been quite a while
> since I did any Haskell programming, so I've forgotten most of the basics.)
Hi Christopher,
Did you change your keybindings to use the focusUp and focusDown
defined in XMonad.Layout.BoringWindows ? When you do that, you'll only
be able to switch focus when your layout is using "boringWindows", so
you won't be able to switch focus with the keyboard when you're in the
second tiled layout that has all windows visible:
boringWindows (minimize (Full ||| tiled)) ||| tiled
A layoutmodifier should probably exist which listens to the FocusUp
and FocusDown messages defined in BoringWindow should be applied to
the second tiled. One doesn't exist right now. It could probably be
written with a variation on XMonad.Layout.MessageControl that allows
blocking messages that would match the pattern (ReplaceBoring
"Minimize" _). In pseudocode:
boringWindows (minimize (Full ||| tiled)) ||| blockMsg (ReplaceBoring
"Minimize" _) (boringWindows tiled)
Resorting to template haskell to take a pattern as an argument
probably will result in the usage looking like:
$(blockMsg [p| ReplaceBoring "Minimize" _ |] [| boringWindows tiled |] )
But maybe that's just overcomplicating things and we should just
modify the BoringWindows module to split up the focus messages from
the boring-setting messages. Let me know if you need detail on how to
go about actually solving these problems.
--
Adam
More information about the xmonad
mailing list