diff options
author | Adam Vogt <vogt.adam@gmail.com> | 2009-06-18 03:01:18 +0200 |
---|---|---|
committer | Adam Vogt <vogt.adam@gmail.com> | 2009-06-18 03:01:18 +0200 |
commit | bfb82d0656f23b9a5b68b31dc985423844499f34 (patch) | |
tree | 1e2a3e9a0a65c1b4667bdc7458bb91f8559a7926 /XMonad | |
parent | 477ac70445bcebc96d76a73dd1bee50e990f9391 (diff) | |
download | XMonadContrib-bfb82d0656f23b9a5b68b31dc985423844499f34.tar.gz XMonadContrib-bfb82d0656f23b9a5b68b31dc985423844499f34.tar.xz XMonadContrib-bfb82d0656f23b9a5b68b31dc985423844499f34.zip |
use 'take 1' instead of custom truncHead function in L.WindowNavigation
Ignore-this: ecbb2063337bb87108c12a3c3f8ceeba
darcs-hash:20090618010118-1499c-7df4207cf205d4a669fbfb68d375f63e27ad1b66.gz
Diffstat (limited to 'XMonad')
-rw-r--r-- | XMonad/Layout/WindowNavigation.hs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/XMonad/Layout/WindowNavigation.hs b/XMonad/Layout/WindowNavigation.hs index e8ef796..50d2a3c 100644 --- a/XMonad/Layout/WindowNavigation.hs +++ b/XMonad/Layout/WindowNavigation.hs @@ -130,7 +130,7 @@ instance LayoutModifier WindowNavigation Window where (\d -> take 1 $ navigable d pt wrs) [U,D,R,L] wnavigablec = nub $ concatMap (\d -> map (\(win,_) -> (win,dirc d)) $ - truncHead $ navigable d pt wrs) [U,D,R,L] + take 1 $ navigable d pt wrs) [U,D,R,L] wothers = case state of Just (NS _ wo) -> map fst wo _ -> [] mapM_ (sc nbc) (wothers \\ map fst wnavigable) @@ -192,10 +192,6 @@ instance LayoutModifier WindowNavigation Window where navigable :: Direction -> Point -> [(Window, Rectangle)] -> [(Window, Rectangle)] navigable d pt = sortby d . filter (inr d pt . snd) -truncHead :: [a] -> [a] -truncHead (x:_) = [x] -truncHead [] = [] - sc :: Pixel -> Window -> X () sc c win = withDisplay $ \dpy -> io $ setWindowBorder dpy win c |