Skip to content

Commit

Permalink
Export the WindowData type from WorkspaceHUD
Browse files Browse the repository at this point in the history
  • Loading branch information
colonelpanic8 committed May 31, 2017
1 parent 47495ed commit 3789e35
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions src/System/Taffybar/WorkspaceHUD.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
module System.Taffybar.WorkspaceHUD (
IconInfo(..),
WWC(..),
WindowData(..),
Workspace(..),
WorkspaceContentsController(..),
WorkspaceButtonController(..),
WorkspaceUnderlineController(..),
WorkspaceContentsController(..),
WorkspaceHUDConfig(..),
WorkspaceUnderlineController(..),
WorkspaceWidgetController(..),
buildBorderButtonController,
buildButtonController,
Expand Down Expand Up @@ -636,17 +637,22 @@ windowTitleClassIconGetter
-> (String -> String -> IconInfo)
-> (WindowData -> HUDIO IconInfo)
windowTitleClassIconGetter preferCustom customIconF = fn
where fn w@WindowData { windowTitle = wTitle
, windowClass = wClass
} =
do
let customResult = customIconF wTitle wClass
defaultResult <- defaultGetIconInfo w
let first = if preferCustom then customResult else defaultResult
let second = if preferCustom then defaultResult else customResult
return $ case first of
IINone -> second
_ -> first
where
fn w@WindowData {windowTitle = wTitle, windowClass = wClass} = do
let customResult = customIconF wTitle wClass
defaultResult <- defaultGetIconInfo w
let first =
if preferCustom
then customResult
else defaultResult
let second =
if preferCustom
then defaultResult
else customResult
return $
case first of
IINone -> second
_ -> first

updateImages :: WorkspaceContentsController -> Workspace -> HUDIO [IconWidget]
updateImages wcc ws = do
Expand Down

0 comments on commit 3789e35

Please sign in to comment.