I've been using the xmonad tiling window manager for a while now, and picked up a bit of Haskell along the way so I could make sense of configuring it. I'm mainly a Python guy, and I enjoyed doing a bit of Clojure not too long ago - I really liked it, but pure functional languages like Haskell are new to me.
I soon came to need one feature that xmonad lacks - namely, being able to save the current state of a workspace, complete with any modifications to the layout state such as resizing and reordering windows. This StackOverflow answer comes pretty close: xmonad already stores and then reloads all of its state when you restart it. I would like to implement this in order to learn some actual Haskell; however, I'm a complete newb at Haskell and I find myself at a complete loss.
I'm thinking of starting out by writing something like a LayoutModifier which responds to a message and writes the underlying layout's state to a file... only I don't understand file IO in Haskell and can't figure out whether the layout state would be in the available scope. Actually, can a LayoutModifier even take a Choice of layouts (which the ||| layout combinator seems to be returning)? Do you nice folks happen to have any pointers?submitted by egasimus
[link] [4 comments]