Add gmail custom icon

This commit is contained in:
Ivan Malison 2017-05-30 18:23:13 -07:00
parent 7cf973df02
commit d79cfb4b1d
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8
2 changed files with 12 additions and 10 deletions

View File

@ -109,16 +109,18 @@ main = do
(try $ getEnv "TAFFYBAR_MONITOR") :: IO (Either SomeException String) (try $ getEnv "TAFFYBAR_MONITOR") :: IO (Either SomeException String)
interfaceNames <- getInterfaces interfaceNames <- getInterfaces
homeDirectory <- getHomeDirectory homeDirectory <- getHomeDirectory
let resourcesDirectory file = let resourcesDirectory = homeDirectory </> ".lib" </> "resources"
homeDirectory </> ".lib" </> "resources" </> file inResourcesDirectory file = resourcesDirectory </> file
fallbackIcons _ klass makeIcon = IIFilePath . inResourcesDirectory
| "URxvt" `isInfixOf` klass = myCustomIcon title klass
IIFilePath $ resourcesDirectory "urxvt.png" | "URxvt" `isInfixOf` klass = makeIcon "urxvt.png"
| "Termite" `isInfixOf` klass = | "Termite" `isInfixOf` klass = makeIcon "urxvt.png"
IIFilePath $ resourcesDirectory "urxvt.png" | "Kodi" `isInfixOf` klass = makeIcon "kodi.png"
| "Kodi" `isInfixOf` klass = IIFilePath $ resourcesDirectory "kodi.png" | "@gmail.com" `isInfixOf` title &&
| otherwise = IIColor (0xFF, 0xFF, 0, 0xFF) "chrome" `isInfixOf` klass &&
myGetIconInfo = windowTitleClassIconGetter False fallbackIcons "Gmail" `isInfixOf` title = makeIcon "gmail.png"
| otherwise = IINone
myGetIconInfo = windowTitleClassIconGetter True myCustomIcon
(monFilter, monNumber) = (monFilter, monNumber) =
case monEither of case monEither of
Left _ -> (allMonitors, 0) Left _ -> (allMonitors, 0)

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB