[taffybar] Update to support toggling
This commit is contained in:
parent
d773662d44
commit
f45e0cf442
@ -63,14 +63,13 @@ main = do
|
|||||||
(monFilter, monNumber) =
|
(monFilter, monNumber) =
|
||||||
case monEither of
|
case monEither of
|
||||||
Left _ -> (allMonitors, 0)
|
Left _ -> (allMonitors, 0)
|
||||||
Right monString -> case readMaybe monString of
|
Right monString ->
|
||||||
|
case readMaybe monString of
|
||||||
Nothing -> (allMonitors, 0)
|
Nothing -> (allMonitors, 0)
|
||||||
Just num -> (Nothing, num)
|
Just num -> (Nothing, num)
|
||||||
memCfg =
|
memCfg =
|
||||||
defaultGraphConfig
|
defaultGraphConfig
|
||||||
{ graphDataColors = [(0.129, 0.588, 0.953, 1)]
|
{graphDataColors = [(0.129, 0.588, 0.953, 1)], graphLabel = Just "mem"}
|
||||||
, graphLabel = Just "mem"
|
|
||||||
}
|
|
||||||
cpuCfg =
|
cpuCfg =
|
||||||
defaultGraphConfig
|
defaultGraphConfig
|
||||||
{ graphDataColors = [(0, 1, 0, 1), (1, 0, 1, 0.5)]
|
{ graphDataColors = [(0, 1, 0, 1), (1, 0, 1, 0.5)]
|
||||||
@ -114,7 +113,7 @@ main = do
|
|||||||
los = makeUnderline (layoutSwitcherNew pgr) "red"
|
los = makeUnderline (layoutSwitcherNew pgr) "red"
|
||||||
wnd = makeUnderline (windowSwitcherNew pgr) "teal"
|
wnd = makeUnderline (windowSwitcherNew pgr) "teal"
|
||||||
|
|
||||||
defaultTaffybar
|
taffyConfig =
|
||||||
defaultTaffybarConfig
|
defaultTaffybarConfig
|
||||||
{ startWidgets = [hud, los, wnd]
|
{ startWidgets = [hud, los, wnd]
|
||||||
, endWidgets =
|
, endWidgets =
|
||||||
@ -125,12 +124,14 @@ main = do
|
|||||||
, makeUnderline mpris "red"
|
, makeUnderline mpris "red"
|
||||||
]
|
]
|
||||||
, monitorNumber = monNumber
|
, monitorNumber = monNumber
|
||||||
, monitorFilter = monFilter
|
, getMonitorConfig = monFilter
|
||||||
, barPosition = Top
|
, barPosition = Top
|
||||||
, barHeight = 50
|
, barHeight = 50
|
||||||
, widgetSpacing = 5
|
, widgetSpacing = 5
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defaultTaffybar taffyConfig
|
||||||
|
|
||||||
-- Local Variables:
|
-- Local Variables:
|
||||||
-- flycheck-ghc-args: ("-Wno-missing-signatures")
|
-- flycheck-ghc-args: ("-Wno-missing-signatures")
|
||||||
-- End:
|
-- End:
|
||||||
|
Loading…
Reference in New Issue
Block a user