mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-05 14:41:54 -07:00
record changes
This commit is contained in:
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
### Breaking Changes
|
### Breaking Changes
|
||||||
|
|
||||||
|
* `XMonad.Layout.Decoration`
|
||||||
|
- Added `Theme` record fields for controlling decoration border width for active/inactive/urgent windows.
|
||||||
* `XMonad.Prompt`
|
* `XMonad.Prompt`
|
||||||
|
|
||||||
- Prompt ships a vim-like keymap, see `vimLikeXPKeymap` and
|
- Prompt ships a vim-like keymap, see `vimLikeXPKeymap` and
|
||||||
|
@@ -74,6 +74,9 @@ data Theme =
|
|||||||
, activeBorderColor :: String -- ^ Color of the border of the active window
|
, activeBorderColor :: String -- ^ Color of the border of the active window
|
||||||
, inactiveBorderColor :: String -- ^ Color of the border of the inactive window
|
, inactiveBorderColor :: String -- ^ Color of the border of the inactive window
|
||||||
, urgentBorderColor :: String -- ^ Color of the border of the urgent window
|
, urgentBorderColor :: String -- ^ Color of the border of the urgent window
|
||||||
|
, activeBorderWidth :: Dimension -- ^ Width of the border of the active window
|
||||||
|
, inactiveBorderWidth :: Dimension -- ^ Width of the border of the inactive window
|
||||||
|
, urgentBorderWidth :: Dimension -- ^ Width of the border of the urgent window
|
||||||
, activeTextColor :: String -- ^ Color of the text of the active window
|
, activeTextColor :: String -- ^ Color of the text of the active window
|
||||||
, inactiveTextColor :: String -- ^ Color of the text of the inactive window
|
, inactiveTextColor :: String -- ^ Color of the text of the inactive window
|
||||||
, urgentTextColor :: String -- ^ Color of the text of the urgent window
|
, urgentTextColor :: String -- ^ Color of the text of the urgent window
|
||||||
@@ -94,6 +97,9 @@ instance Default Theme where
|
|||||||
, activeBorderColor = "#FFFFFF"
|
, activeBorderColor = "#FFFFFF"
|
||||||
, inactiveBorderColor = "#BBBBBB"
|
, inactiveBorderColor = "#BBBBBB"
|
||||||
, urgentBorderColor = "##00FF00"
|
, urgentBorderColor = "##00FF00"
|
||||||
|
, activeBorderWidth = 1
|
||||||
|
, inactiveBorderWidth = 1
|
||||||
|
, urgentBorderWidth = 1
|
||||||
, activeTextColor = "#FFFFFF"
|
, activeTextColor = "#FFFFFF"
|
||||||
, inactiveTextColor = "#BFBFBF"
|
, inactiveTextColor = "#BFBFBF"
|
||||||
, urgentTextColor = "#FF0000"
|
, urgentTextColor = "#FF0000"
|
||||||
@@ -395,9 +401,10 @@ updateDeco sh t fs ((w,_),(Just dw,Just (Rectangle _ _ wh ht))) = do
|
|||||||
| win `elem` ur -> uc
|
| win `elem` ur -> uc
|
||||||
| otherwise -> ic) . W.peek)
|
| otherwise -> ic) . W.peek)
|
||||||
`fmap` gets windowset
|
`fmap` gets windowset
|
||||||
(bc,borderc,tc) <- focusColor w (inactiveColor t, inactiveBorderColor t, inactiveTextColor t)
|
(bc,borderc,borderw,tc) <-
|
||||||
(activeColor t, activeBorderColor t, activeTextColor t)
|
focusColor w (inactiveColor t, inactiveBorderColor t, inactiveBorderWidth t, inactiveTextColor t)
|
||||||
(urgentColor t, urgentBorderColor t, urgentTextColor t)
|
(activeColor t, activeBorderColor t, activeBorderWidth t, activeTextColor t)
|
||||||
|
(urgentColor t, urgentBorderColor t, urgentBorderWidth t, urgentTextColor t)
|
||||||
let s = shrinkIt sh
|
let s = shrinkIt sh
|
||||||
name <- shrinkWhile s (\n -> do size <- io $ textWidthXMF dpy fs n
|
name <- shrinkWhile s (\n -> do size <- io $ textWidthXMF dpy fs n
|
||||||
return $ size > fromIntegral wh - fromIntegral (ht `div` 2)) (show nw)
|
return $ size > fromIntegral wh - fromIntegral (ht `div` 2)) (show nw)
|
||||||
@@ -405,7 +412,7 @@ updateDeco sh t fs ((w,_),(Just dw,Just (Rectangle _ _ wh ht))) = do
|
|||||||
strs = name : map fst (windowTitleAddons t)
|
strs = name : map fst (windowTitleAddons t)
|
||||||
i_als = map snd (windowTitleIcons t)
|
i_als = map snd (windowTitleIcons t)
|
||||||
icons = map fst (windowTitleIcons t)
|
icons = map fst (windowTitleIcons t)
|
||||||
paintTextAndIcons dw fs wh ht 1 bc borderc tc bc als strs i_als icons
|
paintTextAndIcons dw fs wh ht borderw bc borderc tc bc als strs i_als icons
|
||||||
updateDeco _ _ _ (_,(Just w,Nothing)) = hideWindow w
|
updateDeco _ _ _ (_,(Just w,Nothing)) = hideWindow w
|
||||||
updateDeco _ _ _ _ = return ()
|
updateDeco _ _ _ _ = return ()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user