Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

xmobar: add a battery indicator

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
  • Loading branch information...
commit 250c6007eb1b069c73189a39da064fcb20ae9f00 1 parent 1698ce8
@trofi authored
Showing with 3 additions and 2 deletions.
  1. +2 −1  .xmobarrc
  2. +1 −1  .xmonad/xmonad.hs
View
3  .xmobarrc
@@ -10,9 +10,10 @@ Config { font = "-xos4-terminus-medium-*-*-*-*-160-*-*-*-*-iso10646-1"
, Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10
, Run Memory ["-t","Mem: <usedratio>%"] 10
, Run Date "%A | %Y-%m-%d %H:%M" "date" 10
+ , Run Battery ["-L","50","-H","75","--high","green","--normal","yellow", "--low", "red"] 10
, Run StdinReader
]
, sepChar = "%"
, alignSep = "}{"
- , template = "%StdinReader% }{ %cpu% ||| %memory% ||| %eth0% | %ppp0% | <fc=#ee9a00>%date%</fc>"
+ , template = "%StdinReader% }{ %battery% ||| %cpu% ||| %memory% ||| %eth0% | %ppp0% | <fc=#ee9a00>%date%</fc>"
}
View
2  .xmonad/xmonad.hs
@@ -192,7 +192,7 @@ myStartupHook = return ()
------------------------------------------------------------------------
xmobarCmdT = " xmobar -o -B '#122c80' -F '#adbadd' -f 'xft:Terminus-12' -t '%StdinReader%'"
-xmobarCmdB = "~/bin/player-status.sh | xmobar -b -B '#122c60' -F '#adbadd' -f 'xft:Terminus-10' -t '%StdinReader% }{ %cpu% | %memory% ||| %wlan0% ||| <fc=cyan>%date%</fc>'"
+xmobarCmdB = "~/bin/player-status.sh | xmobar -b -B '#122c60' -F '#adbadd' -f 'xft:Terminus-10' -t '%StdinReader% }{ %battery% | %cpu% | %memory% ||| %wlan0% ||| <fc=cyan>%date%</fc>'"
-- xmobarCmdB = "~/bin/player-status.sh | xmobar -b -B '#122c60' -F '#adbadd' -f 'xft:Terminus-10' -t '%StdinReader% }{ %cpu% | %memory% ||| %wlan0% ||| <fc=cyan>%date%</fc>'"
main = do dinT <- spawnPipe xmobarCmdT
dinB <- spawnPipe xmobarCmdB
Please sign in to comment.
Something went wrong with that request. Please try again.