diff options
-rw-r--r-- | src/Xmobar/Plugins/StdinReader.hs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/Xmobar/Plugins/StdinReader.hs b/src/Xmobar/Plugins/StdinReader.hs index 4d5c438..c1e2724 100644 --- a/src/Xmobar/Plugins/StdinReader.hs +++ b/src/Xmobar/Plugins/StdinReader.hs @@ -27,7 +27,6 @@ import System.IO import System.IO.Error (isEOFError) import Xmobar.Run.Exec import Xmobar.X11.Actions (stripActions) -import Control.Concurrent (threadDelay) import Control.Exception import Control.Monad (forever) @@ -45,15 +44,11 @@ instance Exec StdinReader where -- there'd be a pileup of xmobars handler (fromException -> Just e) | isEOFError e = exitImmediately ExitSuccess -- any other exception, like "invalid argument (invalid byte sequence)", - -- is logged to both stderr and the bar itself, throttled to avoid - -- excessive CPU usage whenever someone pipes garbage into xmobar, and - -- then discarded without terminating, so a single charset error doesn't - -- break the entire xmobar + -- is logged to both stderr and the bar itself handler e = do let errorMessage = "xmobar: Received exception " <> show e hPutStrLn stderr errorMessage cb $ stripActions errorMessage - threadDelay 1000000 escape :: StdinReader -> String -> String escape StdinReader = stripActions |