mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
27 lines
770 B
Haskell
27 lines
770 B
Haskell
{-# LANGUAGE NamedFieldPuns #-}
|
|
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
|
|
|
|
module Leanamonad.Layout.ResizableTile
|
|
( module XMonad.Layout.ResizableTile
|
|
, RTFixDescription(..)
|
|
) where
|
|
|
|
import XMonad
|
|
import qualified XMonad.StackSet as W
|
|
import XMonad.Layout.ResizableTile
|
|
|
|
newtype RTFixDescription a = RTFixDescription { unwrapRT :: ResizableTall a }
|
|
deriving (Read, Show)
|
|
|
|
instance LayoutClass RTFixDescription a where
|
|
runLayout (W.Workspace t l s) =
|
|
let ws' = W.Workspace t (unwrapRT l) s
|
|
in fmap (fmap (fmap RTFixDescription))
|
|
. runLayout ws'
|
|
|
|
handleMessage (RTFixDescription l) m =
|
|
fmap (fmap RTFixDescription)
|
|
$ handleMessage l m
|
|
|
|
description (RTFixDescription l) =
|
|
description l <> " " <> show (_nmaster l)
|