diff options
author | David Roundy <droundy@darcs.net> | 2007-10-16 23:43:37 +0200 |
---|---|---|
committer | David Roundy <droundy@darcs.net> | 2007-10-16 23:43:37 +0200 |
commit | d1919800f85b211ca7b4e9d52cba2d3cb1e56264 (patch) | |
tree | 14af97f61be4e51f685c29e9002248ccb8758b36 | |
parent | 7cd00f42deda004cc20d2335a0934bef8c295213 (diff) | |
download | XMonadContrib-d1919800f85b211ca7b4e9d52cba2d3cb1e56264.tar.gz XMonadContrib-d1919800f85b211ca7b4e9d52cba2d3cb1e56264.tar.xz XMonadContrib-d1919800f85b211ca7b4e9d52cba2d3cb1e56264.zip |
make windowNavigation simpler to use in simplest case.
darcs-hash:20071016214337-72aca-db7bca50796462b6913659b4ba270d4a051c8ceb.gz
-rw-r--r-- | WindowNavigation.hs | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/WindowNavigation.hs b/WindowNavigation.hs index c9977a3..39dce22 100644 --- a/WindowNavigation.hs +++ b/WindowNavigation.hs @@ -18,7 +18,7 @@ module XMonadContrib.WindowNavigation ( -- * Usage -- $usage - windowNavigation, + windowNavigation, configurableNavigation, Navigate(..), Direction(..), navigateColor, navigateBrightness, noNavigateBorders, defaultWNConfig @@ -39,11 +39,11 @@ import XMonadContrib.XUtils -- -- > import XMonadContrib.WindowNavigation -- > --- > layoutHook = Layout $ windowNavigation defaultWNConfig $ Select ... +-- > layoutHook = Layout $ windowNavigation $ Select ... -- -- or perhaps -- --- > layoutHook = Layout $ windowNavigation (navigateBorder "green") $ Select ... +-- > layoutHook = Layout $ configurableNavigation (navigateBorder "green") $ Select ... -- -- In keybindings: -- @@ -63,9 +63,9 @@ import XMonadContrib.XUtils -- %keybind , ((modMask .|. controlMask, xK_Down ), sendMessage $ Swap D) -- %layout -- include 'windowNavigation' in layoutHook definition above. -- %layout -- just before the list, like the following (don't uncomment next line): --- %layout -- layoutHook = Layout $ windowNavigation defaultWNConfig $ ... +-- %layout -- layoutHook = Layout $ windowNavigation $ ... -- %layout -- or --- %layout -- layoutHook = Layout $ windowNavigation (navigateBorder "green") $ ... +-- %layout -- layoutHook = Layout $ configurableNavigation (navigateBorder "green") $ ... data Navigate = Go Direction | Swap Direction deriving ( Read, Show, Typeable ) @@ -100,8 +100,11 @@ data NavigationState a = NS Point [(a,Rectangle)] data WindowNavigation a = WindowNavigation WNConfig (Invisible Maybe (NavigationState a)) deriving ( Read, Show ) -windowNavigation :: LayoutClass l a => WNConfig -> l a -> ModifiedLayout WindowNavigation l a -windowNavigation conf = ModifiedLayout (WindowNavigation conf (I Nothing)) +windowNavigation :: LayoutClass l a => l a -> ModifiedLayout WindowNavigation l a +windowNavigation = ModifiedLayout (WindowNavigation defaultWNConfig (I Nothing)) + +configurableNavigation :: LayoutClass l a => WNConfig -> l a -> ModifiedLayout WindowNavigation l a +configurableNavigation conf = ModifiedLayout (WindowNavigation conf (I Nothing)) instance LayoutModifier WindowNavigation Window where redoLayout (WindowNavigation conf (I state)) rscr s wrs = |