From 4866f2e367dfcf22a9591231ba40948826a1b438 Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Thu, 1 Nov 2007 21:10:59 +0100 Subject: Hierarchify darcs-hash:20071101201059-a5988-fc1f1262bec1b69e13ba18ae7cefeafc8c4471d4.gz --- FocusNth.hs | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 FocusNth.hs (limited to 'FocusNth.hs') diff --git a/FocusNth.hs b/FocusNth.hs deleted file mode 100644 index 28e8e96..0000000 --- a/FocusNth.hs +++ /dev/null @@ -1,48 +0,0 @@ ------------------------------------------------------------------------------ --- | --- Module : XMonadContrib.FocusNth --- Copyright : (c) Karsten Schoelzel --- License : BSD --- --- Maintainer : Karsten Schoelzel --- Stability : unstable --- Portability : unportable --- --- Focus the nth window on the screen. ------------------------------------------------------------------------------ - -module XMonadContrib.FocusNth ( - -- * Usage - -- $usage - focusNth) where - -import XMonad.StackSet -import XMonad.Operations -import XMonad - --- $usage --- > import XMonadContrib.FocusNth - --- > -- mod4-[1..9] @@ Switch to window N --- > ++ [((mod4Mask, k), focusNth i) --- > | (i, k) <- zip [0 .. 8] [xK_1 ..]] - --- %import XMonadContrib.FocusNth --- %keybdindextra ++ --- %keybdindextra -- mod4-[1..9] @@ Switch to window N --- %keybdindextra [((mod4Mask, k), focusNth i) --- %keybdindextra | (i, k) <- zip [0 .. 8] [xK_1 ..]] - -focusNth :: Int -> X () -focusNth = windows . modify' . focusNth' - -focusNth' :: Int -> Stack a -> Stack a -focusNth' n s@(Stack _ ls rs) | (n < 0) || (n > length(ls) + length(rs)) = s - | otherwise = listToStack n (integrate s) - -listToStack :: Int -> [a] -> Stack a -listToStack n l = Stack t ls rs - where (t:rs) = drop n l - ls = reverse (take n l) - - -- cgit v1.2.3