diff options
author | Todd Lunter <tlunter@gmail.com> | 2013-05-26 13:23:59 -0400 |
---|---|---|
committer | Todd Lunter <tlunter@gmail.com> | 2013-05-26 13:23:59 -0400 |
commit | f655873269ccd8992c5f5610327a24f78c449403 (patch) | |
tree | a8800a63ae49bc8611d53c30128edb953bf534fc /src/Plugins/Monitors/Batt.hs | |
parent | 12424d6eda711947eff7fad4f1429627b780fe01 (diff) | |
download | xmobar-f655873269ccd8992c5f5610327a24f78c449403.tar.gz xmobar-f655873269ccd8992c5f5610327a24f78c449403.tar.bz2 |
Made parseTemplate recursively replace template variables.
Diffstat (limited to 'src/Plugins/Monitors/Batt.hs')
-rw-r--r-- | src/Plugins/Monitors/Batt.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Plugins/Monitors/Batt.hs b/src/Plugins/Monitors/Batt.hs index eddec06..4c0232f 100644 --- a/src/Plugins/Monitors/Batt.hs +++ b/src/Plugins/Monitors/Batt.hs @@ -163,9 +163,8 @@ runBatt' bfs args = do case c of Result x w t s -> do l <- fmtPercent x - let ts = [fmtTime $ floor t, fmtWatts w opts suffix d] - s' <- parseTemplate' (s ++ "<acstatus>") (l ++ "":ts) - parseTemplate (l ++ s':ts) + let ts = [fmtTime $ floor t, fmtWatts w opts suffix d] + parseTemplate (l ++ s:ts) NA -> return "N/A" where fmtPercent :: Float -> Monitor [String] fmtPercent x = do |