aboutsummaryrefslogtreecommitdiffstats
path: root/Accordion.hs
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-11-01 21:10:59 +0100
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-11-01 21:10:59 +0100
commit4866f2e367dfcf22a9591231ba40948826a1b438 (patch)
tree7a245caee3f146826b267d773b7eaa80386a818e /Accordion.hs
parent47589e1913fb9530481caedb543978a30d4323ea (diff)
downloadXMonadContrib-4866f2e367dfcf22a9591231ba40948826a1b438.tar.gz
XMonadContrib-4866f2e367dfcf22a9591231ba40948826a1b438.tar.xz
XMonadContrib-4866f2e367dfcf22a9591231ba40948826a1b438.zip
Hierarchify
darcs-hash:20071101201059-a5988-fc1f1262bec1b69e13ba18ae7cefeafc8c4471d4.gz
Diffstat (limited to 'Accordion.hs')
-rw-r--r--Accordion.hs50
1 files changed, 0 insertions, 50 deletions
diff --git a/Accordion.hs b/Accordion.hs
deleted file mode 100644
index f5c24d8..0000000
--- a/Accordion.hs
+++ /dev/null
@@ -1,50 +0,0 @@
-{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, TypeSynonymInstances #-}
-
------------------------------------------------------------------------------
--- |
--- Module : XMonadContrib.Accordion
--- Copyright : (c) glasser@mit.edu
--- License : BSD
---
--- Maintainer : glasser@mit.edu
--- Stability : unstable
--- Portability : unportable
---
--- LayoutClass that puts non-focused windows in ribbons at the top and bottom
--- of the screen.
------------------------------------------------------------------------------
-
-module XMonadContrib.Accordion (
- -- * Usage
- -- $usage
- Accordion(Accordion)) where
-
-import XMonad
-import XMonad.Layouts
-import qualified XMonad.StackSet as W
-import Graphics.X11.Xlib
-import Data.Ratio
-
--- $usage
--- > import XMonadContrib.Accordion
--- > layouts = [ Layout Accordion ]
-
--- %import XMonadContrib.Accordion
--- %layout , Layout Accordion
-
-data Accordion a = Accordion deriving ( Read, Show )
-
-instance LayoutClass Accordion Window where
- pureLayout _ sc ws = zip ups tops ++ [(W.focus ws, mainPane)] ++ zip dns bottoms
- where
- ups = W.up ws
- dns = W.down ws
- (top, allButTop) = splitVerticallyBy (1%8 :: Ratio Int) sc
- (center, bottom) = splitVerticallyBy (6%7 :: Ratio Int) allButTop
- (allButBottom, _) = splitVerticallyBy (7%8 :: Ratio Int) sc
- mainPane | ups /= [] && dns /= [] = center
- | ups /= [] = allButTop
- | dns /= [] = allButBottom
- | otherwise = sc
- tops = if ups /= [] then splitVertically (length ups) top else []
- bottoms = if dns /= [] then splitVertically (length dns) bottom else []