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

View File

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