openbsd-ports/x11/hs-xmonad-contrib/patches/patch-XMonad_Util_Loggers_hs
dcoppa 4b80072b63 Update xmonad and hs-xmonad-contrib to 0.11
Bump x11/bluetile accordingly

OK kili@
2013-01-24 09:44:18 +00:00

16 lines
833 B
Plaintext

$OpenBSD: patch-XMonad_Util_Loggers_hs,v 1.3 2013/01/24 09:44:18 dcoppa Exp $
Use our apm(8) instead of linux-only acpi
--- XMonad/Util/Loggers.hs.orig Tue Jan 1 02:32:44 2013
+++ XMonad/Util/Loggers.hs Tue Jan 22 16:06:00 2013
@@ -120,7 +120,7 @@ aumixVolume = logCmd "aumix -vq"
-- At some point it would be nice to make this more general\/have
-- fewer dependencies (assumes @\/usr\/bin\/acpi@ and @sed@ are installed.)
battery :: Logger
-battery = logCmd "/usr/bin/acpi | sed -r 's/.*?: (.*%).*/\\1/; s/[dD]ischarging, ([0-9]+%)/\\1-/; s/[cC]harging, ([0-9]+%)/\\1+/; s/[cC]harged, //'"
+battery = logCmd "printf \"%s%% %s\" \"`apm -l`\" \"`apm -a -v | sed 's|A/C adapter state: ||'`\""
-- | Get the current date and time, and format them via the
-- given format string. The format used is the same as that used