mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 22:59:15 +00:00
vanadium/xmonad: refactor
This commit is contained in:
parent
073078a922
commit
d243e6c32f
5 changed files with 10 additions and 12 deletions
|
|
@ -0,0 +1,26 @@
|
|||
{-# LANGUAGE NamedFieldPuns #-}
|
||||
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
|
||||
|
||||
module XMonad.Layout.ResizableTile.FixDescription
|
||||
( 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue