No more tabs

This commit is contained in:
Spencer Janssen
2007-12-22 05:04:39 +00:00
parent da6155ebac
commit 662eeb7e5f
10 changed files with 28 additions and 27 deletions

View File

@@ -16,9 +16,9 @@
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
module XMonad.Actions.ConstrainedResize ( module XMonad.Actions.ConstrainedResize (
-- * Usage -- * Usage
-- $usage -- $usage
XMonad.Actions.ConstrainedResize.mouseResizeWindow XMonad.Actions.ConstrainedResize.mouseResizeWindow
) where ) where
import XMonad import XMonad

View File

@@ -17,9 +17,9 @@
-- Based on the FlexibleResize code by Lukas Mai (mauke). -- Based on the FlexibleResize code by Lukas Mai (mauke).
module XMonad.Actions.FlexibleManipulate ( module XMonad.Actions.FlexibleManipulate (
-- * Usage -- * Usage
-- $usage -- $usage
mouseWindow, discrete, linear, resize, position mouseWindow, discrete, linear, resize, position
) where ) where
import XMonad import XMonad

View File

@@ -13,9 +13,9 @@
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
module XMonad.Actions.FlexibleResize ( module XMonad.Actions.FlexibleResize (
-- * Usage -- * Usage
-- $usage -- $usage
XMonad.Actions.FlexibleResize.mouseResizeWindow XMonad.Actions.FlexibleResize.mouseResizeWindow
) where ) where
import XMonad import XMonad

View File

@@ -38,12 +38,13 @@ focusNth :: Int -> X ()
focusNth = windows . modify' . focusNth' focusNth = windows . modify' . focusNth'
focusNth' :: Int -> Stack a -> Stack a focusNth' :: Int -> Stack a -> Stack a
focusNth' n s@(Stack _ ls rs) | (n < 0) || (n > length(ls) + length(rs)) = s focusNth' n s@(Stack _ ls rs) | (n < 0) || (n > length(ls) + length(rs)) = s
| otherwise = listToStack n (integrate s) | otherwise = listToStack n (integrate s)
listToStack :: Int -> [a] -> Stack a listToStack :: Int -> [a] -> Stack a
listToStack n l = Stack t ls rs listToStack n l = Stack t ls rs
where (t:rs) = drop n l where
ls = reverse (take n l) (t:rs) = drop n l
ls = reverse (take n l)

View File

@@ -15,7 +15,7 @@
module XMonad.Actions.MouseGestures ( module XMonad.Actions.MouseGestures (
-- * Usage -- * Usage
-- $usage -- $usage
Direction(..), Direction(..),
mouseGesture mouseGesture
) where ) where

View File

@@ -12,10 +12,10 @@
-- place. -- place.
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
module XMonad.Actions.RotSlaves ( module XMonad.Actions.RotSlaves (
-- $usage -- $usage
rotSlaves', rotSlavesUp, rotSlavesDown, rotSlaves', rotSlavesUp, rotSlavesDown,
rotAll', rotAllUp, rotAllDown rotAll', rotAllUp, rotAllDown
) where ) where
import XMonad.StackSet import XMonad.StackSet
import XMonad import XMonad

View File

@@ -107,7 +107,7 @@ doLay mirror (DragPane mw ty delta split) r s = do
mirror $ Rectangle x y (w-halfHandleWidth) h mirror $ Rectangle x y (w-halfHandleWidth) h
right = case right' of right = case right' of
Rectangle x y w h -> Rectangle x y w h ->
mirror $ Rectangle (x+halfHandleWidth) y (w-halfHandleWidth) h mirror $ Rectangle (x+halfHandleWidth) y (w-halfHandleWidth) h
handr = case left' of handr = case left' of
Rectangle x y w h -> Rectangle x y w h ->
mirror $ Rectangle (x + fromIntegral w - halfHandleWidth) y (2*halfHandleWidth) h mirror $ Rectangle (x + fromIntegral w - halfHandleWidth) y (2*halfHandleWidth) h

View File

@@ -17,7 +17,7 @@
module XMonad.Layout.Grid ( module XMonad.Layout.Grid (
-- * Usage -- * Usage
-- $usage -- $usage
Grid(..) Grid(..)
) where ) where
import XMonad import XMonad

View File

@@ -204,8 +204,8 @@ updateTab ishr c fs wh (tabw,ow) = do
dpy <- asks display dpy <- asks display
let s = shrinkIt ishr let s = shrinkIt ishr
name <- shrinkWhile s (\n -> do name <- shrinkWhile s (\n -> do
size <- io $ textWidthXMF dpy fs n size <- io $ textWidthXMF dpy fs n
return $ size > fromIntegral wh - fromIntegral (ht `div` 2)) (show nw) return $ size > fromIntegral wh - fromIntegral (ht `div` 2)) (show nw)
paintAndWrite tabw fs wh ht 1 bc' borderc' tc' bc' AlignCenter name paintAndWrite tabw fs wh ht 1 bc' borderc' tc' bc' AlignCenter name
shrink :: TConf -> Rectangle -> Rectangle shrink :: TConf -> Rectangle -> Rectangle
@@ -217,10 +217,10 @@ shrinkWhile sh p x = sw $ sh x
where sw [n] = return n where sw [n] = return n
sw [] = return "" sw [] = return ""
sw (n:ns) = do sw (n:ns) = do
cond <- p n cond <- p n
if cond if cond
then sw ns then sw ns
else return n else return n
data CustomShrink = CustomShrink data CustomShrink = CustomShrink
instance Show CustomShrink where show _ = "" instance Show CustomShrink where show _ = ""

View File

@@ -22,7 +22,7 @@ module XMonad.Util.XUtils (
, deleteWindow , deleteWindow
, paintWindow , paintWindow
, paintAndWrite , paintAndWrite
, stringToPixel , stringToPixel
) where ) where