From fcf4277aea91f7abd7f10b38ed37ae42ee14f3e7 Mon Sep 17 00:00:00 2001 From: Devin Mullins Date: Mon, 12 May 2008 06:04:49 +0200 Subject: SpawnUrgencyHook, FWIW darcs-hash:20080512040449-78224-22bf6a8ae3f956e58d4dc0142c88643dfcfea5f3.gz --- XMonad/Hooks/UrgencyHook.hs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'XMonad') diff --git a/XMonad/Hooks/UrgencyHook.hs b/XMonad/Hooks/UrgencyHook.hs index 516f234..1b895aa 100644 --- a/XMonad/Hooks/UrgencyHook.hs +++ b/XMonad/Hooks/UrgencyHook.hs @@ -24,6 +24,7 @@ module XMonad.Hooks.UrgencyHook ( readUrgents, withUrgents, urgencyLayoutHook, NoUrgencyHook(..), StdoutUrgencyHook(..), + SpawnUrgencyHook(..), dzenUrgencyHook, DzenUrgencyHook(..), UrgencyHook(urgencyHook), seconds @@ -178,6 +179,14 @@ instance UrgencyHook DzenUrgencyHook where dzenUrgencyHook :: DzenUrgencyHook dzenUrgencyHook = DzenUrgencyHook { duration = (5 `seconds`), args = [] } +-- | Spawn a commandline thing, appending the window id to the prefix string +-- you provide. (Make sure to add a space if you need it.) Do your crazy compiz +-- thing. +newtype SpawnUrgencyHook = SpawnUrgencyHook String deriving (Read, Show) + +instance UrgencyHook SpawnUrgencyHook where + urgencyHook (SpawnUrgencyHook prefix) w = spawn $ prefix ++ show w + -- For debugging purposes, really. data StdoutUrgencyHook = StdoutUrgencyHook deriving (Read, Show) -- cgit v1.2.3