Xmonad Help, How Do I Make Window Master after Focused for a Specified Time

A place to discuss your desktop environments and window managers. Need help installing your DE? Ask here. Need help configuring your new tiling window manager? We might be able to help.
Post Reply
frosty
Posts: 1
Joined: Tue Oct 13, 2020 8:30 pm

Xmonad Help, How Do I Make Window Master after Focused for a Specified Time

Post by frosty » Tue Oct 13, 2020 8:33 pm

Hi!

I am very new to Haskell, and I am having trouble accomplishing this. Any way you could help would be greatly appreciated. :)

I have a pretty small laptop screen, and I normally use my applications in a fullscreen/monocle layout. However this makes it difficult to remember where exactly my applications are in the stack, since I cant see them.

To solve this problem, I would like to have xmonad automatically make a window go to the top of the stack after I have focused it for a certain amount of time. Kind of like how Android manages its applications.

I think this can be done with a hook? Something like this?

Code: Select all

import XMonad
import Control.Monad (when)


-- What Do I Do With This Hook After Its Fleshed Out?
hook :: Event -> X All
hook (AnyEvent {ev_event_type = et}) = do
  when (et == focusIn) $
    
     -- How do I make the focused window the first window in the stack after a time?


  return (All True)
hook _ = return (All True)

I am a newbie at this, and I would really appreciate some suggestions, this has been bugging me for a while, and you'd really be doing me a favor. :D

Post Reply