[xmonad] darcs patch: new contrib module, Layout.PerWorkspace
byorgey at gmail.com
Tue Nov 20 11:34:50 EST 2007
On Nov 20, 2007 11:10 AM, David Roundy <droundy at darcs.net> wrote:
> On Tue, Nov 20, 2007 at 11:07:50AM -0500, Brent Yorgey wrote:
> > > I'd also add that I think it'd be handy to be able to give a list of
> > > WorkspaceId rather than just one, so we could say
> > >
> > > onWorkspaces ["web","email","irc"] mytabbed $
> > > onWorkspaces ["darcs","xmonad"] (mytabbed <-//> mytabbed ||| mytabbed)
> > > Full
> > >
> > > That'd be a stupid set of layouts, but you can see the idea: most
> > > will have two or three sets of layouts, max, and will want to divy
> them up
> > > among their workspaces.
> > I thought of this, but the problem is the types. What should the type
> > onWorkspaces be? If you try to write this function, you get an infinite
> > type error. Unless there's some tricky type-hacking that can be done to
> > around it.
> onWorkspaces :: (LayoutClass l1 a, LayoutClass l2 a)
> => [WorkspaceId] -- ^ the tag of workspaces to match
> -> (l1 a) -- ^ layout to use on the matched workspace
> -> (l2 a) -- ^ layout to use everywhere else
> -> PerWorkspace l1 l2 a
> data PerWorkspace l1 l2 a = PerWorkspace [WorkspaceId]
> (Maybe Bool)
> (l1 a)
> (l2 a)
> deriving (Read, Show)
> I think that's the key: moving the functionality into the data type.
Ah, indeed! Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the xmonad