xmonad-contrib-0.6: Third party extensions for xmonadSource codeContentsIndex
XMonad.Hooks.DynamicLog
Portabilityunportable
Stabilityunstable
MaintainerDon Stewart <dons@cse.unsw.edu.au>
Contents
Usage
Description

DynamicLog

By default, log events in:

     1 2 [3] 4 8

format, although the format is highly customizable. Suitable to pipe into dzen or xmobar.

Synopsis
dynamicLog :: X ()
dynamicLogDzen :: X ()
dynamicLogXmobar :: X ()
dynamicLogWithPP :: PP -> X ()
dynamicLogXinerama :: X ()
dzen :: (XConfig (Choose Tall (Choose (Mirror Tall) Full)) -> IO ()) -> IO ()
pprWindowSet :: ([WindowSpace] -> [WindowSpace]) -> [Window] -> PP -> WindowSet -> String
pprWindowSetXinerama :: WindowSet -> String
data PP = PP {
ppCurrent :: WorkspaceId -> String
ppVisible :: WorkspaceId -> String
ppHidden :: WorkspaceId -> String
ppHiddenNoWindows :: WorkspaceId -> String
ppUrgent :: WorkspaceId -> String
ppSep :: String
ppWsSep :: String
ppTitle :: String -> String
ppLayout :: String -> String
ppOrder :: [String] -> [String]
ppOutput :: String -> IO ()
}
defaultPP :: PP
dzenPP :: PP
sjanssenPP :: PP
wrap :: String -> String -> String -> String
pad :: String -> String
shorten :: Int -> String -> String
xmobarColor :: String -> String -> String -> String
dzenColor :: String -> String -> String -> String
dzenEscape :: String -> String
makeSimpleDzenConfig :: IO (XConfig (Choose Tall (Choose (Mirror Tall) Full)))
Usage

You can use this module with the following in your ~/.xmonad/xmonad.hs:

    import XMonad
    import XMonad.Hooks.DynamicLog
    main = xmonad defaultConfig { logHook = dynamicLog }
dynamicLog :: X ()Source

An example log hook, print a status bar output to stdout, in the form:

 1 2 [3] 4 7 : full : title

That is, the currently populated workspaces, the current workspace layout, and the title of the focused window.

dynamicLogDzen :: X ()Source
An example log hook that emulates dwm's status bar, using colour codes printed to dzen Requires dzen. Workspaces, xinerama, layouts and the window title are handled.
dynamicLogXmobar :: X ()Source
These are good defaults to be used with the xmobar status bar
dynamicLogWithPP :: PP -> X ()Source
A log function that uses the PP hooks to customize output.
dynamicLogXinerama :: X ()Source

Workspace logger with a format designed for Xinerama:

 [1 9 3] 2 7

where 1, 9, and 3 are the workspaces on screens 1, 2 and 3, respectively, and 2 and 7 are non-visible, non-empty workspaces

dzen :: (XConfig (Choose Tall (Choose (Mirror Tall) Full)) -> IO ()) -> IO ()Source

Run xmonad with a dzen status bar set to some nice defaults. Output is taken from the dynamicLogWithPP hook.

 main = dzen xmonad

The intent is that the above config file should provide a nice status bar with minimal effort.

pprWindowSet :: ([WindowSpace] -> [WindowSpace]) -> [Window] -> PP -> WindowSet -> StringSource
pprWindowSetXinerama :: WindowSet -> StringSource
data PP Source
The PP type allows the user to customize various behaviors of dynamicLogPP
Constructors
PP
ppCurrent :: WorkspaceId -> String
ppVisible :: WorkspaceId -> String
ppHidden :: WorkspaceId -> String
ppHiddenNoWindows :: WorkspaceId -> String
ppUrgent :: WorkspaceId -> String
ppSep :: String
ppWsSep :: String
ppTitle :: String -> String
ppLayout :: String -> String
ppOrder :: [String] -> [String]
ppOutput :: String -> IO ()
defaultPP :: PPSource
The default pretty printing options, as seen in dynamicLog
dzenPP :: PPSource
Settings to emulate dwm's statusbar, dzen only
sjanssenPP :: PPSource
The options that sjanssen likes to use, as an example. Note the use of xmobarColor and the record update on defaultPP
wrap :: String -> String -> String -> StringSource
pad :: String -> StringSource
shorten :: Int -> String -> StringSource
xmobarColor :: String -> String -> String -> StringSource
dzenColor :: String -> String -> String -> StringSource
dzenEscape :: String -> StringSource
Escape any dzen metacharacters.
makeSimpleDzenConfig :: IO (XConfig (Choose Tall (Choose (Mirror Tall) Full)))Source
An example xmonad config that spawns a new dzen toolbar and uses the default dynamic log output
Produced by Haddock version 2.3.0