[taffybar] Updates for new workspaceHUD options

This commit is contained in:
Ivan Malison 2017-03-01 19:21:58 -08:00
parent 2bcb404036
commit 70bfaa6567
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8
2 changed files with 46 additions and 30 deletions

View File

@ -34,34 +34,41 @@ myGetIconInfo =
windowTitleClassIconGetter False fallbackIcons
main = do
let memCfg = defaultGraphConfig { graphDataColors = [(1, 0, 0, 1)]
, graphLabel = Just "mem"
}
cpuCfg = defaultGraphConfig { graphDataColors = [ (0, 1, 0, 1)
, (1, 0, 1, 0.5)
]
let memCfg =
defaultGraphConfig
{graphDataColors = [(1, 0, 0, 1)], graphLabel = Just "mem"}
cpuCfg =
defaultGraphConfig
{ graphDataColors = [(0, 1, 0, 1), (1, 0, 1, 0.5)]
, graphLabel = Just "cpu"
}
let clock = textClockNew Nothing "%a %b %_d %r" 1
pagerConfig = defaultPagerConfig
pagerConfig = defaultPagerConfig {useImages = True}
mpris = mpris2New
mem = pollingGraphNew memCfg 1 memCallback
cpu = pollingGraphNew cpuCfg 0.5 cpuCallback
tray = systrayNew
hudConfig = defaultWorkspaceHUDConfig { underlineHeight = 3
hudConfig =
defaultWorkspaceHUDConfig
{ underlineHeight = 3
, minWSWidgetSize = Nothing
, minIcons = 3
, getIconInfo = myGetIconInfo
, windowIconSize = 32
, updateIconsOnTitleChange = False
, widgetGap = 5
, widgetGap = 0
-- , widgetBuilder = buildBorderButtonController
-- , showWorkspaceFn = hideEmpty
, showWorkspaceFn = hideEmpty
, updateRateLimitMicroseconds = 100000
, updateIconsOnTitleChange = True
, updateOnWMIconChange = True
, debugMode = True
}
hudPagerConfig = hudFromPagerConfig pagerConfig
hud = taffyPagerHUDNew pagerConfig hudConfig
defaultTaffybar defaultTaffybarConfig { startWidgets = [ hud ]
pager = taffyPagerNew pagerConfig
defaultTaffybar
defaultTaffybarConfig
{ startWidgets = [hud]
, endWidgets = [tray, clock, mem, cpu, mpris]
, monitorNumber = 1
, barPosition = Top

View File

@ -9,12 +9,14 @@ style "taffybar-default" {
color["dgrey"] = "#212121"
color["lgrey"] = "#bdbdbd"
color["teal"] = "#80CBC4"
color["bgrey"] = "#37474F"
color["bgreyl"] = "#546E7A"
bg[NORMAL] = @dgrey
bg[NORMAL] = @bgrey
fg[NORMAL] = @white
text[NORMAL] = @white
fg[PRELIGHT] = @green
bg[PRELIGHT] = @black
bg[PRELIGHT] = @teal
}
style "taffybar-active-window" = "taffybar-default" {
@ -31,15 +33,19 @@ style "taffybar-workspace-border-active" = "taffybar-default" {
bg[NORMAL] = @yellow
fg[NORMAL] = @black
}
style "taffybar-workspace-contents-active" = "taffybar-default" {
}
style "taffybar-workspace-border-visible" = "taffybar-default" {
bg[NORMAL] = @red
fg[NORMAL] = @black
}
style "taffybar-workspace-border-empty" = "taffybar-default" {
bg[NORMAL] = @black
bg[NORMAL] = @blue
}
style "taffybar-workspace-border-hidden" = "taffybar-default" {
bg[NORMAL] = @black
bg[NORMAL] = @blue
fg[NORMAL] = @black
}
style "taffybar-workspace-border-urgent" = "taffybar-default" {
@ -59,6 +65,9 @@ widget "Taffybar*" style "taffybar-default"
widget "Taffybar*WindowSwitcher*label" style "taffybar-active-window"
widget "*NotificationCloseButton" style "taffybar-notification-button"
widget "*Workspace-underline*-active*" style "taffybar-workspace-border-active"
widget "*Workspace-contents*-active*" style "taffybar-workspace-contents-active"
widget "*Workspace-underline*-active*" style "taffybar-workspace-border-active"
widget "*Workspace-underline*-visible*" style "taffybar-workspace-border-visible"
widget "*Workspace-underline*-empty*" style "taffybar-workspace-border-empty"