aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Vornberger <jan.vornberger@informatik.uni-oldenburg.de>2009-10-12 00:05:12 +0200
committerJan Vornberger <jan.vornberger@informatik.uni-oldenburg.de>2009-10-12 00:05:12 +0200
commit065c1c1ce99572278b083edd5aabaf10baa1b0c2 (patch)
treec3a523b1cebd108841c65569019fd61e715830c9
parentfe8981dc85976366bfba9a65eb4a8f1a8801b429 (diff)
downloadXMonadContrib-065c1c1ce99572278b083edd5aabaf10baa1b0c2.tar.gz
XMonadContrib-065c1c1ce99572278b083edd5aabaf10baa1b0c2.tar.xz
XMonadContrib-065c1c1ce99572278b083edd5aabaf10baa1b0c2.zip
NoFrillsDecoration - most basic version of decoration for windows
Ignore-this: accda53da08f37d6b4091d1c6e17e2c1 darcs-hash:20091011220512-594c5-e42409c3dfba829e6e0ece6f00f1f887b4d9a027.gz
-rw-r--r--XMonad/Layout/NoFrillsDecoration.hs48
-rw-r--r--xmonad-contrib.cabal1
2 files changed, 49 insertions, 0 deletions
diff --git a/XMonad/Layout/NoFrillsDecoration.hs b/XMonad/Layout/NoFrillsDecoration.hs
new file mode 100644
index 0000000..0101b23
--- /dev/null
+++ b/XMonad/Layout/NoFrillsDecoration.hs
@@ -0,0 +1,48 @@
+{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
+----------------------------------------------------------------------------
+-- |
+-- Module : XMonad.Layout.NoFrillsDecoration
+-- Copyright : (c) Jan Vornberger 2009
+-- License : BSD3-style (see LICENSE)
+--
+-- Maintainer : jan.vornberger@informatik.uni-oldenburg.de
+-- Stability : unstable
+-- Portability : not portable
+--
+-- Most basic version of decoration for windows without any additional
+-- modifications. In contrast to "XMonad.Layout.SimpleDecoration" this will
+-- result in title bars that span the entire window instead of being only the
+-- length of the window title.
+--
+-----------------------------------------------------------------------------
+
+module XMonad.Layout.NoFrillsDecoration
+ ( -- * Usage:
+ -- $usage
+ noFrillsDeco
+ ) where
+
+import XMonad.Layout.Decoration
+
+-- $usage
+-- You can use this module with the following in your
+-- @~\/.xmonad\/xmonad.hs@:
+--
+-- > import XMonad.Layout.NoFrillsDecoration
+--
+-- Then edit your @layoutHook@ by adding the NoFrillsDecoration to
+-- your layout:
+--
+-- > myL = noFrillsDeco shrinkText defaultTheme (layoutHook defaultConfig)
+-- > main = xmonad defaultConfig { layoutHook = myL }
+--
+
+-- | Add very simple decorations to windows of a layout.
+noFrillsDeco :: (Eq a, Shrinker s) => s -> Theme
+ -> l a -> ModifiedLayout (Decoration NoFrillsDecoration s) l a
+noFrillsDeco s c = decoration s c $ NFD True
+
+data NoFrillsDecoration a = NFD Bool deriving (Show, Read)
+
+instance Eq a => DecorationStyle NoFrillsDecoration a where
+ describeDeco _ = "NoFrillsDeco"
diff --git a/xmonad-contrib.cabal b/xmonad-contrib.cabal
index cebc348..c816156 100644
--- a/xmonad-contrib.cabal
+++ b/xmonad-contrib.cabal
@@ -175,6 +175,7 @@ library
XMonad.Layout.MultiToggle.Instances
XMonad.Layout.Named
XMonad.Layout.NoBorders
+ XMonad.Layout.NoFrillsDecoration
XMonad.Layout.OneBig
XMonad.Layout.PerWorkspace
XMonad.Layout.Reflect