Integrating boringWindows and minimize

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.) -- frigidcode.com indicium.us

On Fri, Jun 8, 2012 at 9:40 PM, Christopher Howard
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

On Sun, Jun 24, 2012 at 1:46 PM, adam vogt
It could probably be written with a variation on XMonad.Layout.MessageControl that allows blocking messages that would match the pattern (ReplaceBoring "Minimize" _).
You can already do this with the MessageControl layout modifier: ignore Minimize $ <layout> -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms
participants (3)
-
adam vogt
-
Brandon Allbery
-
Christopher Howard