Skip to content

Instantly share code, notes, and snippets.

@pbrisbin
Created October 9, 2010 18:52
Show Gist options
  • Save pbrisbin/618483 to your computer and use it in GitHub Desktop.
Save pbrisbin/618483 to your computer and use it in GitHub Desktop.
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