diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2023-12-09 00:40:01 -0700 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2023-12-09 00:43:01 -0700 |
| commit | 7fcb150943032880abd5a0be6421a68b9cf234a5 (patch) | |
| tree | e962d37efd6f67c1c9af194ccdbae48b967eff9a /src/Main.hs | |
| parent | 04a1fd2e2f2eaa9878c4bc67351784d6685ca22b (diff) | |
| download | rde-7fcb150943032880abd5a0be6421a68b9cf234a5.tar.gz rde-7fcb150943032880abd5a0be6421a68b9cf234a5.tar.bz2 rde-7fcb150943032880abd5a0be6421a68b9cf234a5.zip | |
Added BorderColors.hs
This module manager border colors for the windows and handles
automatically maintaining the colors across stack changes.
This also adds green borders to pinned windows to differentiate them
from normal windows.
Diffstat (limited to 'src/Main.hs')
| -rw-r--r-- | src/Main.hs | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/Main.hs b/src/Main.hs index 507bd43..f1938a6 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -2,7 +2,9 @@ import Control.Monad.Reader ( MonadReader (ask), ReaderT (runReaderT), ) +import Data.List (isPrefixOf) import Data.Monoid (Endo (Endo)) +import qualified Rahm.Desktop.BorderColors import Rahm.Desktop.Common ( Location (Location), getCurrentWorkspace, @@ -45,6 +47,7 @@ import XMonad terminal, workspaces ), + XState (dragging), appName, className, composeAll, @@ -53,11 +56,14 @@ import XMonad floatLocation, liftX, mod3Mask, + modify, + mouseDrag, + refresh, spawn, title, withWindowSet, (-->), - (=?), mouseDrag, refresh, modify, XState (dragging), + (=?), ) import qualified XMonad as X (xmonad) import XMonad.Hooks.DynamicProperty (dynamicTitle) @@ -65,8 +71,6 @@ import XMonad.Hooks.EwmhDesktops (ewmh) import XMonad.Hooks.ManageDocks (docks) import XMonad.Hooks.ManageHelpers (doFullFloat, isFullscreen) import XMonad.Layout.Fullscreen (fullscreenEventHook) -import Data.List (isPrefixOf) -import Rahm.Desktop.Keys.Wml (wmlLogHook) main = do logHook <- xMobarLogHook @@ -83,8 +87,13 @@ main = do (=<<) X.xmonad $ applyKeys $ - withStackChangeHook historyHook $ - ewmh $ + withStackChangeHook + ( mconcat + [ historyHook, + Rahm.Desktop.BorderColors.stackChangeHook + ] + ) + $ ewmh $ docks $ def { terminal = "alacritty", @@ -129,7 +138,7 @@ main = do ], focusFollowsMouse = False, clickJustFocuses = False, - logHook = wmlLogHook >> logHook xmobar + logHook = logHook xmobar } -- Should the chrome window float? Returns false if the window's title starts |