Skip to content

Instantly share code, notes, and snippets.

@jchia
Created December 17, 2019 15:55
Show Gist options
  • Save jchia/b83b4e5030879299a095c23e1c8d9a30 to your computer and use it in GitHub Desktop.
Save jchia/b83b4e5030879299a095c23e1c8d9a30 to your computer and use it in GitHub Desktop.
import System.Taffybar
import System.Taffybar.Context (TaffybarConfig(..))
import System.Taffybar.Hooks
import System.Taffybar.SimpleConfig
import System.Taffybar.Widget
config :: TaffybarConfig
config =
let myWorkspacesConfig =
defaultWorkspacesConfig
{ minIcons = 1
, widgetGap = 0
, showWorkspaceFn = hideEmpty
}
workspaces = workspacesNew myWorkspacesConfig
clock = textClockNewWith defaultClockConfig
layout = layoutNew defaultLayoutConfig
windowsW = windowsNew defaultWindowsConfig
myConfig = defaultSimpleTaffyConfig
{ startWidgets =
workspaces : map (>>= buildContentsBox) [ layout, windowsW ]
, endWidgets = map (>>= buildContentsBox) [ clock ]
, barPosition = Top
, barPadding = 10
, barHeight = 50
, widgetSpacing = 0
}
in withLogServer . withToggleServer $ toTaffyConfig myConfig
main :: IO ()
main = startTaffybar config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment