Files
xmonad-contrib/XMonad/Util
ivanbrennan 8e12681925 export clickableWrap
Configs that apply WorkspaceId transformations, such as
IndependentScreens (adding/removing a screen-number prefix) and
NamedWorkspaces (adding/removing a name suffix), cannot use clickablePP
as is, since they need to apply clickableWrap to an appropriately
transformed WorkspaceId. Rather than force them to reimpliment
clickableWrap, export it.

An example use-case, where IndependentScreens has added a screen number
prefix to the workspace ids (0_1, 0_2, ...), and we want a status-bar
that shows the ids without screen number (1, 2, ...), but also makes
them clickable:

    getClickable :: (WorkspaceId -> WorkspaceId) -> X (WorkspaceId -> String)
    getClickable f = do
      wsIndex <- getWsIndex
      pure $ \ws -> case wsIndex (f ws) of
                      Just idx -> clickableWrap idx ws
                      Nothing -> ws

    composePP :: PP -> ScreenId -> X PP
    composePP pp s = do
      clickable <- getClickable (marshall s)
      return
        . marshallPP s
        $ pp
          { ppCurrent         = ppCurrent         pp . clickable,
            ppVisible         = ppVisible         pp . clickable,
            ppHidden          = ppHidden          pp . clickable,
            ppHiddenNoWindows = ppHiddenNoWindows pp . clickable,
            ppUrgent          = ppUrgent          pp . clickable
          }
2020-10-14 07:31:44 -04:00
..
2016-07-16 13:22:34 -04:00
2020-10-14 07:31:44 -04:00
2016-11-30 17:55:20 +02:00
2019-10-08 10:33:56 +02:00
2019-10-08 11:27:30 +02:00
2018-04-04 14:25:42 +02:00
2019-05-07 22:32:05 +01:00
2016-07-16 13:22:34 -04:00
2019-10-08 11:27:30 +02:00
2019-10-08 11:27:30 +02:00
2016-09-08 17:00:21 +02:00
2009-10-05 16:31:32 +00:00
2016-01-16 00:37:19 -05:00
2019-10-08 11:27:30 +02:00