From 062dc06f56f11a8830c208f402822297b57bc7dc Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Sun, 10 Feb 2008 13:25:23 +0100 Subject: DecorationMadness: added a few floating layouts darcs-hash:20080210122523-32816-e38b64a7e17f2fd0de4b08c95ddea6fbc0107089.gz --- XMonad/Layout/DecorationMadness.hs | 81 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) (limited to 'XMonad/Layout/DecorationMadness.hs') diff --git a/XMonad/Layout/DecorationMadness.hs b/XMonad/Layout/DecorationMadness.hs index ec347ef..874c276 100644 --- a/XMonad/Layout/DecorationMadness.hs +++ b/XMonad/Layout/DecorationMadness.hs @@ -73,6 +73,16 @@ module XMonad.Layout.DecorationMadness , mirrorTallDwmStyle , mirrorTallSimpleTabbed , mirrorTallTabbed + -- * Floating decorated layouts + -- $float + , floatSimpleSimple + , floatSimple + , floatSimpleDefault + , floatDefault + , floatSimpleDwmStyle + , floatDwmStyle + , floatSimpleTabbed + , floatTabbed , defaultTheme, shrinkText ) where @@ -87,6 +97,7 @@ import XMonad.Layout.Accordion import XMonad.Layout.Circle import XMonad.Layout.ResizeScreen import XMonad.Layout.WindowArranger +import XMonad.Layout.SimpleFloat -- $usage -- You can use this module with the following in your @@ -521,3 +532,73 @@ mirrorTallSimpleTabbed = decoration shrinkText defaultTheme SimpleTabbed (resize mirrorTallTabbed :: Shrinker s => s -> Theme -> ModifiedLayout (Decoration SimpleTabbedDecoration s) (ModifiedLayout ResizeScreen (Mirror Tall)) Window mirrorTallTabbed s t = decoration s t SimpleTabbed (resizeVertical (fi $ decoHeight t) mirrorTall) + +-- $float +-- Here you will find decorated layout based on the SimpleFloating +-- layout + +-- | A simple floating layout where every window is placed according +-- to the window's initial attributes. +-- +-- Here you can find a screen shot: +-- +-- +floatSimpleSimple :: ModifiedLayout (Decoration SimpleDecoration DefaultShrinker) + (ModifiedLayout WindowArranger SimpleFloat) a +floatSimpleSimple = simpleFloat + +floatSimple :: Shrinker s => s -> Theme -> + ModifiedLayout (Decoration SimpleDecoration s) + (ModifiedLayout WindowArranger SimpleFloat) a +floatSimple = simpleFloat' + +-- | This version is decorated with the 'DefaultDecoration' style. +-- +-- Here you can find a screen shot: +-- +-- +floatSimpleDefault :: ModifiedLayout (Decoration DefaultDecoration DefaultShrinker) + (ModifiedLayout WindowArranger SimpleFloat) a +floatSimpleDefault = decoration shrinkText defaultTheme DefaultDecoration (windowArrangeAll $ SF 20) + +-- | Same as 'defaultFloat', but with the possibility of setting a +-- custom shrinker and a custom theme. +floatDefault :: Shrinker s => s -> Theme -> + ModifiedLayout (Decoration DefaultDecoration s) + (ModifiedLayout WindowArranger SimpleFloat) a +floatDefault s c = decoration s c DefaultDecoration (windowArrangeAll $ SF (decoHeight c)) + +-- | This version is decorated with the 'DwmStyle'. Note that this is +-- a keyboard only floating layout. +-- +-- Here you can find a screen shot: +-- +-- +floatSimpleDwmStyle :: Eq a => ModifiedLayout (Decoration DwmStyle DefaultShrinker) + (ModifiedLayout WindowArranger SimpleFloat) a +floatSimpleDwmStyle = decoration shrinkText defaultTheme Dwm (windowArrangeAll $ SF 20) + +-- | Same as 'dwmStyleFloat', but with the possibility of setting a +-- custom shrinker and a custom theme. +floatDwmStyle :: (Eq a, Shrinker s) => s -> Theme -> + ModifiedLayout (Decoration DwmStyle s) + (ModifiedLayout WindowArranger SimpleFloat) a +floatDwmStyle s c = decoration s c Dwm (windowArrangeAll $ SF (decoHeight c)) + +-- | This version is decorated with the 'TabbedDecoration' style. +-- | Mouse dragging is somehow weird. +-- +-- Here you can find a screen shot: +-- +-- +floatSimpleTabbed :: Eq a => ModifiedLayout (Decoration SimpleTabbedDecoration DefaultShrinker) + (ModifiedLayout WindowArranger SimpleFloat) a +floatSimpleTabbed = decoration shrinkText defaultTheme SimpleTabbed (windowArrangeAll $ SF 20) + +-- | Same as 'tabbedFloat', but with the possibility of setting a +-- custom shrinker and a custom theme. +floatTabbed :: (Eq a, Shrinker s) => s -> Theme -> + ModifiedLayout (Decoration SimpleTabbedDecoration s) + (ModifiedLayout WindowArranger SimpleFloat) a +floatTabbed s c = decoration s c SimpleTabbed (windowArrangeAll $ SF (decoHeight c)) + -- cgit v1.2.3