aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Hooks
diff options
context:
space:
mode:
authorBraden Shepherdson <Braden.Shepherdson@gmail.com>2008-07-06 18:08:47 +0200
committerBraden Shepherdson <Braden.Shepherdson@gmail.com>2008-07-06 18:08:47 +0200
commita48bb7af70d633b3d9b88f7e8e812dcbf14cfd4a (patch)
tree973c1fa98a9ab4a556e343f321aa76646a9d8aeb /XMonad/Hooks
parent0d2c0b4e7b44b306c5c994a51fd196541b9955a3 (diff)
downloadXMonadContrib-a48bb7af70d633b3d9b88f7e8e812dcbf14cfd4a.tar.gz
XMonadContrib-a48bb7af70d633b3d9b88f7e8e812dcbf14cfd4a.tar.xz
XMonadContrib-a48bb7af70d633b3d9b88f7e8e812dcbf14cfd4a.zip
Added ewmhLogHookCustom, which allows arbitrary transformation of the workspace list.
darcs-hash:20080706160847-d53a8-2b6ded39b1f4da02e9bfd52d9ccaf7d05829b517.gz
Diffstat (limited to 'XMonad/Hooks')
-rw-r--r--XMonad/Hooks/EwmhDesktops.hs15
1 files changed, 13 insertions, 2 deletions
diff --git a/XMonad/Hooks/EwmhDesktops.hs b/XMonad/Hooks/EwmhDesktops.hs
index 7984dff..a0d6689 100644
--- a/XMonad/Hooks/EwmhDesktops.hs
+++ b/XMonad/Hooks/EwmhDesktops.hs
@@ -17,6 +17,7 @@ module XMonad.Hooks.EwmhDesktops (
-- $usage
EwmhDesktopsHook,
ewmhDesktopsLogHook,
+ ewmhDesktopsLogHookCustom,
ewmhDesktopsLayout
) where
@@ -53,13 +54,23 @@ import XMonad.Hooks.EventHook
--
-- "XMonad.Doc.Extending#Editing_the_layout_hook"
+
+
+
-- |
-- Notifies pagers and window lists, such as those in the gnome-panel
-- of the current state of workspaces and windows.
ewmhDesktopsLogHook :: X ()
-ewmhDesktopsLogHook = withWindowSet $ \s -> do
+ewmhDesktopsLogHook = ewmhDesktopsLogHookCustom id
+
+
+-- |
+-- Generalized version of ewmhDesktopsLogHook that allows an arbitrary
+-- user-specified function to transform the workspace list (post-sorting)
+ewmhDesktopsLogHookCustom :: ([WindowSpace] -> [WindowSpace]) -> X ()
+ewmhDesktopsLogHookCustom f = withWindowSet $ \s -> do
sort' <- getSortByIndex
- let ws = sort' $ W.workspaces s
+ let ws = f $ sort' $ W.workspaces s
setSupported