mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 03:20:21 -07:00
I believe this common use-case for the deprecated X.L.Named should still be provided somewhere, rather than telling everybody to let-define this themselves. The other one – `nameTail` – only has about 6 uses in publicly available configs (https://github.com/search?q=nameTail+path%3Axmonad&type=code), so I'm not adding that one but I'm happy to be convinced to add it too. Related: 3bf9d80c40b9 ("XMonad.Layout.Named: Deprecate")
50 lines
1.6 KiB
Haskell
50 lines
1.6 KiB
Haskell
{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses #-}
|
|
|
|
-----------------------------------------------------------------------------
|
|
-- |
|
|
-- Module : XMonad.Layout.Named
|
|
-- Description : Assign a name to a given layout.
|
|
-- Copyright : (c) David Roundy <droundy@darcs.net>
|
|
-- License : BSD3-style (see LICENSE)
|
|
--
|
|
-- Maintainer : none
|
|
-- Stability : unstable
|
|
-- Portability : unportable
|
|
--
|
|
-- A module for assigning a name to a given layout. Deprecated, use
|
|
-- "XMonad.Layout.Renamed" instead.
|
|
--
|
|
-----------------------------------------------------------------------------
|
|
|
|
module XMonad.Layout.Named {-# DEPRECATED "Use XMonad.Layout.Renamed instead" #-}
|
|
( -- * Usage
|
|
-- $usage
|
|
named,
|
|
nameTail
|
|
) where
|
|
|
|
import XMonad.Layout.LayoutModifier
|
|
import XMonad.Layout.Renamed
|
|
|
|
-- $usage
|
|
-- You can use this module with the following in your @~\/.xmonad\/xmonad.hs@:
|
|
--
|
|
-- > import XMonad.Layout.Named
|
|
--
|
|
-- Then edit your @layoutHook@ by adding the Named layout modifier
|
|
-- to some layout:
|
|
--
|
|
-- > myLayout = named "real big" Full ||| (nameTail $ named "real big" $ Full) ||| etc..
|
|
-- > main = xmonad def { layoutHook = myLayout }
|
|
--
|
|
-- For more detailed instructions on editing the layoutHook see
|
|
-- <https://xmonad.org/TUTORIAL.html#customizing-xmonad the tutorial> and
|
|
-- "XMonad.Doc.Extending#Editing_the_layout_hook".
|
|
--
|
|
-- Note that this module has been deprecated and may be removed in a future
|
|
-- release, please use "XMonad.Layout.Renamed" instead.
|
|
|
|
-- | (Deprecated) Remove the first word of the name.
|
|
nameTail :: l a -> ModifiedLayout Rename l a
|
|
nameTail = renamed [CutWordsLeft 1]
|