Created
October 9, 2010 18:52
-
-
Save pbrisbin/618483 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Dzen | |
import RssReader | |
-- | |
-- this is it, the whole application in one line! | |
-- | |
main :: IO () | |
main = spawnDzen dzenConf >>= spawnReader readerConf | |
-- | |
-- and the configuration part... | |
-- | |
readerConf :: ReaderConf | |
readerConf = defaultReaderConf | |
{ titleFormat = dzenFG "#909090" | |
, descrFormat = shorten 200 | |
, tickerWidth = 150 | |
} | |
where | |
-- some helpers | |
dzenFG c s = concat ["^fg(", c, ")", s, "^fg()"] | |
shorten n s = if length s > n then (take n s) ++ "..." else s | |
dzenConf :: DzenConf | |
dzenConf = defaultDzen | |
{ x_position = 920 | |
, width = 1000 | |
, font = "Verdana-8" -- if you have an xft-capable dzen | |
, fg_color = "#606060" | |
, bg_color = "#303030" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment