diff options
Diffstat (limited to 'src/Rahm/Desktop/Layout/PinWindow.hs')
| -rw-r--r-- | src/Rahm/Desktop/Layout/PinWindow.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Rahm/Desktop/Layout/PinWindow.hs b/src/Rahm/Desktop/Layout/PinWindow.hs index f993eec..6ccf35a 100644 --- a/src/Rahm/Desktop/Layout/PinWindow.hs +++ b/src/Rahm/Desktop/Layout/PinWindow.hs @@ -22,6 +22,7 @@ import qualified Rahm.Desktop.StackSet as W import XMonad import qualified XMonad.StackSet as W (filter) import qualified XMonad.Util.ExtensibleState as XS +import Rahm.Desktop.BorderColors (setBorderColor, BorderColor (BorderColor), resetBorderColor) newtype PinWindowState = PinWindowState (Map ScreenId [(Window, W.RationalRect)]) deriving (Show, Read) @@ -36,6 +37,8 @@ instance ExtensionClass PinWindowState where newtype PinWindowLayout (l :: * -> *) (a :: *) = PinWindowLayout (l a) deriving (Show, Read) +pinnedWindowColor = BorderColor "#00ff00" "#408040" + instance (LayoutClass l a, sid ~ ScreenId, a ~ Window) => LayoutClass (PinWindowLayout l) a where runLayout (W.Workspace t (PinWindowLayout l) stack) rect = do -- Clean up window id's thare should not be pinned anymore because the @@ -100,6 +103,7 @@ pinWindow win = runMaybeT_ $ do -- Don't float the window anymore. modifyWindowSet $ W.sink win + setBorderColor pinnedWindowColor [win] where hoist = MaybeT . return @@ -115,6 +119,7 @@ unpinWindow win = runMaybeT_ $ do -- refloat the window. modifyWindowSet $ W.float win rect + resetBorderColor [win] where hoist = MaybeT . return |