[xmonad] * Converted UrgencyHooks to simple Window -> X () functions [patch]

David McLean gopsychonauts at gmail.com
Fri May 4 02:47:20 CEST 2012


1 patch for repository http://code.haskell.org/XMonadContrib:

Fri May  4 10:38:29 EST 2012  gopsychonauts at gmail.com
  * Converted UrgencyHooks to simple Window -> X () functions
  Previously, UrgencyHooks were members of the typeclass UrgencyHook, and had to
  implement Read and Show instances. This was for historical reasons, as
  originally the UrgencyHook was stored as a layout modifier.

  Changes in the module's implementation---it now uses handleEventHook and
  logHook instead---mean that those constraints are no longer needed. Thus,
  changing the UrgencyHook to a simpler single type is possible. This makes
  writing new UrgencyHooks simpler, as now they're just functions and don't
  require a whole new typeclass instance. It also allows for useful behaviour
  such as UrgencyHook being a Monoid: this increases cohesion in an XConfig
  definition since multiple UrgencyHooks may now be combined with <+>, just as
  manageHook and logHook may be.

  Regrettably, this does break compatibility with any previously-defined custom
  urgency hooks, since the UrgencyHook typeclass no longer exists.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: urgency_hook_function.dpatch
Type: application/octet-stream
Size: 23156 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/xmonad/attachments/20120504/1354832c/attachment-0001.obj>


More information about the xmonad mailing list