aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
authorBen Boeckel <mathstuf@gmail.com>2012-03-11 06:01:43 +0100
committerBen Boeckel <mathstuf@gmail.com>2012-03-11 06:01:43 +0100
commit388d7c1fe4db017e92eefbabc0984aeed5490413 (patch)
treeb0e4de92032dc72658dedcd38ccc970761426ca3 /XMonad
parentb76c3076c3214110e81e58ca63e6aa47d8640a4b (diff)
downloadXMonadContrib-388d7c1fe4db017e92eefbabc0984aeed5490413.tar.gz
XMonadContrib-388d7c1fe4db017e92eefbabc0984aeed5490413.tar.xz
XMonadContrib-388d7c1fe4db017e92eefbabc0984aeed5490413.zip
persist-togglehook-options
Ignore-this: 580bacb35b617c1198f01c5a7c0d3fef Save the state of ToggleHook options over a restart. darcs-hash:20120311050143-24e3f-3d50d3c3d9bcb5cc0af2fe7cd3d51ea78beb5c32.gz
Diffstat (limited to 'XMonad')
-rw-r--r--XMonad/Hooks/ToggleHook.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/XMonad/Hooks/ToggleHook.hs b/XMonad/Hooks/ToggleHook.hs
index aec71f3..2b1e611 100644
--- a/XMonad/Hooks/ToggleHook.hs
+++ b/XMonad/Hooks/ToggleHook.hs
@@ -63,10 +63,11 @@ _pp n f s st = (\b -> guard b >> Just (st s)) <$> _get n f
{- The current state is kept here -}
-data HookState = HookState { hooks :: Map String (Bool, Bool) } deriving (Typeable)
+data HookState = HookState { hooks :: Map String (Bool, Bool) } deriving (Typeable, Read, Show)
instance ExtensionClass HookState where
initialValue = HookState empty
+ extensionType = PersistentExtension
modify' :: String -> ((Bool, Bool) -> (Bool, Bool)) -> X ()
modify' n f = XS.modify (HookState . setter . hooks)