[taffybar] Only use specific monitor when taffybar monitor is set

This commit is contained in:
Ivan Malison 2017-03-10 17:42:38 -08:00
parent c6ee8e5119
commit bd094e7cd3
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -60,14 +60,12 @@ main = do
| "Kodi" `isInfixOf` klass = IIFilePath $ resourcesDirectory "kodi.png" | "Kodi" `isInfixOf` klass = IIFilePath $ resourcesDirectory "kodi.png"
| otherwise = IIColor (0xFF, 0xFF, 0, 0xFF) | otherwise = IIColor (0xFF, 0xFF, 0, 0xFF)
myGetIconInfo = windowTitleClassIconGetter False fallbackIcons myGetIconInfo = windowTitleClassIconGetter False fallbackIcons
monNumber = (monFilter, monNumber) =
case monEither of case monEither of
Left _ -> 0 Left _ -> (allMonitors, 0)
Right monString -> fromMaybe 0 $ readMaybe monString Right monString -> case readMaybe monString of
monFilter = Nothing -> (allMonitors, 0)
case monEither of Just num -> (Nothing, num)
Left _ -> allMonitors
Right _ -> Nothing
memCfg = memCfg =
defaultGraphConfig defaultGraphConfig
{ graphDataColors = [(0.129, 0.588, 0.953, 1)] { graphDataColors = [(0.129, 0.588, 0.953, 1)]