Using the above 'withState' layout modifier and the message 'WSF', you can do per-layout/workspace state. For example one could keep track of whether a workspace has been previously viewed (ex. to start some applications iff you have not seen the workspace before, as done with A.TopicSpace):

This is even less desirable alternative, but it is one of the more acceptable uses of this unsafe function.

+

This is an even less desirable alternative, but it is one of the more acceptable uses of this unsafe function.

Basically, you create a top-level IORef which is forced to be a single copy:

Basically, you create a top-level IORef which is forced to be a single copy:

Line 61:

Line 106:

Previous versions of xmonad had this used in some contrib modules such as XMonad.Hooks.UrgencyHook [http://hackage.haskell.org/packages/archive/xmonad-contrib/0.9.1/doc/html/src/XMonad-Hooks-UrgencyHook.html#urgents source here].

Previous versions of xmonad had this used in some contrib modules such as XMonad.Hooks.UrgencyHook [http://hackage.haskell.org/packages/archive/xmonad-contrib/0.9.1/doc/html/src/XMonad-Hooks-UrgencyHook.html#urgents source here].

Contents

1 General options

1.1 Layouts

Layouts can keep track of their state placing the information in the data type that is an instance of LayoutClass. The various methods of this typeclass allow one to update this information by supplying a new value of this type as a return value.

Using the above 'withState' layout modifier and the message 'WSF', you can do per-layout/workspace state. For example one could keep track of whether a workspace has been previously viewed (ex. to start some applications iff you have not seen the workspace before, as done with A.TopicSpace):

1.2.1 Implicit Parameters

This extension is useful for passing in the iorefs. You generally need these two extensions together, if you like to leave out the type signatures (which are as much work as explicitly passing the parameters):