diff options
author | Eric Mrak <mail@ericmrak.info> | 2014-03-14 14:50:17 -0700 |
---|---|---|
committer | Eric Mrak <mail@ericmrak.info> | 2014-03-14 14:50:17 -0700 |
commit | 62843563ef21fa4c106572e91e88c8127bcf3fbf (patch) | |
tree | 2f622704ea6e68a00193cc86d9da1d2f79e982f4 | |
parent | 9b46234bddbecbcdb9f19aef7f441b15415db07d (diff) | |
download | xmobar-62843563ef21fa4c106572e91e88c8127bcf3fbf.tar.gz xmobar-62843563ef21fa4c106572e91e88c8127bcf3fbf.tar.bz2 |
Battery now has leftvbar
-rw-r--r-- | readme.md | 2 | ||||
-rw-r--r-- | src/Plugins/Monitors/Batt.hs | 5 |
2 files changed, 4 insertions, 3 deletions
@@ -767,7 +767,7 @@ something like: "AC/online") - Variables that can be used with the `-t`/`--template` argument: - `left`, `leftbar`, `timeleft`, `watts`, `acstatus` + `left`, `leftbar`, `leftvbar`, `timeleft`, `watts`, `acstatus` - Default template: `Batt: <watts>, <left>% / <timeleft>` - Example (note that you need "--" to separate regular monitor options from Battery's specific ones): diff --git a/src/Plugins/Monitors/Batt.hs b/src/Plugins/Monitors/Batt.hs index c6e140e..d6b8ce0 100644 --- a/src/Plugins/Monitors/Batt.hs +++ b/src/Plugins/Monitors/Batt.hs @@ -80,7 +80,7 @@ sysDir = "/sys/class/power_supply" battConfig :: IO MConfig battConfig = mkMConfig "Batt: <watts>, <left>% / <timeleft>" -- template - ["leftbar", "left", "acstatus", "timeleft", "watts"] -- replacements + ["leftbar", "leftvbar", "left", "acstatus", "timeleft", "watts"] -- replacements data Files = Files { fFull :: String @@ -174,7 +174,8 @@ runBatt' bfs args = do let x' = minimum [1, x] p <- showPercentWithColors x' b <- showPercentBar (100 * x') x' - return [b, p] + vb <- showVerticalBar (100 * x') + return [b, vb, p] fmtWatts x o s d = do ws <- showWithPadding $ showDigits d x ++ (if s then "W" else "") return $ color x o ws |