Add gmail custom icon
This commit is contained in:
parent
7cf973df02
commit
d79cfb4b1d
@ -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)
|
||||||
|
BIN
dotfiles/lib/resources/gmail.png
Normal file
BIN
dotfiles/lib/resources/gmail.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
Loading…
Reference in New Issue
Block a user