Hoogle Search
Within LTS Haskell 24.67 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
groupSort :: Ord k => [(k, v)] -> [(k, [v])]verset Verset A combination of group and sort.
groupSort [(1,'t'),(3,'t'),(2,'e'),(2,'s')] == [(1,"t"),(2,"es"),(3,"t")] \xs -> map fst (groupSort xs) == sort (nub (map fst xs)) \xs -> concatMap snd (groupSort xs) == map snd (sortOn fst xs)
groupSortBy :: (a -> a -> Ordering) -> [a] -> [[a]]verset Verset A combination of group and sort, using a predicate to compare on.
groupSortBy (compare `on` length) ["test","of","sized","item"] == [["of"],["test","item"],["sized"]]
groupSortOn :: Ord b => (a -> b) -> [a] -> [[a]]verset Verset A combination of group and sort, using a part of the value to compare on.
groupSortOn length ["test","of","sized","item"] == [["of"],["test","item"],["sized"]]
getSortByOrder :: X WorkspaceSortxmonad-contrib XMonad.Actions.DynamicWorkspaceOrder Sort workspaces according to the stored dynamic ordering.
-
xmonad-contrib XMonad.Actions.Submap Like visualSubmap, but is able to sort the descriptions. For example,
import Data.Ord (comparing, Down) visualSubmapSorted (sortBy (comparing Down)) def
would sort the (key, description) pairs by their keys in descending order. ppSort :: PP -> X ([WindowSpace] -> [WindowSpace])xmonad-contrib XMonad.Hooks.DynamicLog how to sort the workspaces. See XMonad.Util.WorkspaceCompare for some useful sorts.
addEwmhWorkspaceSort :: forall (l :: Type -> Type) . X WorkspaceSort -> XConfig l -> XConfig lxmonad-contrib XMonad.Hooks.EwmhDesktops Add (compose after) an arbitrary user-specified function to sort/filter the workspace list. The default/initial function is getSortByIndex. This can be used to e.g. filter out scratchpad workspaces. Workspaces must not be renamed here.
setEwmhWorkspaceSort :: forall (l :: Type -> Type) . X WorkspaceSort -> XConfig l -> XConfig lxmonad-contrib XMonad.Hooks.EwmhDesktops Like addEwmhWorkspaceSort, but replace it instead of adding/composing.
ppSort :: PP -> X ([WindowSpace] -> [WindowSpace])xmonad-contrib XMonad.Hooks.StatusBar.PP how to sort the workspaces. See XMonad.Util.WorkspaceCompare for some useful sorts.
-
xmonad-contrib XMonad.Layout.IndependentScreens vSort is a function that sorts VirtualWindowSpaces with virtual names. marshallSort s vSort is a function which sorts PhysicalWindowSpaces with virtual names, but keeps only the WindowSpace's on screen s. NOTE: vSort operating on virtual names comes with some caveats, see this issue for more information. You can use marshallSort like in the following example:
Example
pp' :: ScreenId -> PP -> PP pp' s pp = (marshallPP s pp) { ppSort = fmap (marshallSort s) (ppSort pp) } mySBL = statusBarProp "xmobar" $ pure (pp' (S 0) pp) mySBR = statusBarProp "xmobar" $ pure (pp' (S 1) pp) main = xmonad $ withEasySB (mySBL <> mySBR) defToggleStrutsKey defIn this way, you have a custom virtual names sort on top of marshallPP.