From a7cded03926a6982f6dc5a8942104c201ff9cdd8 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Wed, 30 Jun 2021 23:04:00 -0400 Subject: [PATCH] ADD low battery message --- bin/xmobar.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bin/xmobar.hs b/bin/xmobar.hs index 64b1594..dc72aca 100644 --- a/bin/xmobar.hs +++ b/bin/xmobar.hs @@ -36,6 +36,7 @@ import XMonad.Internal.DBus.Common (xmonadBus) import XMonad.Internal.DBus.Control (pathExists) import XMonad.Internal.DBus.IntelBacklight (blPath) import XMonad.Internal.DBus.Screensaver (ssPath) +import XMonad.Internal.Shell (fmtCmd) import qualified XMonad.Internal.Theme as T import Xmobar @@ -120,12 +121,21 @@ batteryCmd = CmdSpec , "--normal", T.fgColor , "--high", T.fgColor , "--" + , "-a", notify , "-P" , "-o" , "\xf0e7" , "-O" , "\xf1e6" , "-i" , "\xf1e6" ] 50 } + where + notify = fmtCmd "notify-send" + [ "-u" + , "critical" + , "-i" + , "'dialog-information-symbolic'" + , "'low battery'" + ] vpnCmd :: CmdSpec vpnCmd = CmdSpec