mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-01 04:31:52 -07:00
NoFrillsDecoration - most basic version of decoration for windows
This commit is contained in:
48
XMonad/Layout/NoFrillsDecoration.hs
Normal file
48
XMonad/Layout/NoFrillsDecoration.hs
Normal file
@@ -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"
|
Reference in New Issue
Block a user