From 36efb086430ba0c314d16b76870a68fa8b82a5f7 Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 26 Sep 2009 23:51:32 +0200 Subject: Fix for PipeReader contents feching. Ignore-this: d3362cb2b00c407b9ccc6adc97fdbf0d Apparently, a pipe has to be opened in r/w mode for xmobar to update the display of its contents when the latter changes in time. I don't see the reason for this, but the fact remains that opening the pipe in ReadMode does not work. darcs-hash:20090926215132-a9375-0b3384071129d6352493c959fbf078e3a9f58709.gz --- Plugins/PipeReader.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/PipeReader.hs b/Plugins/PipeReader.hs index a0709b1..3886ec6 100644 --- a/Plugins/PipeReader.hs +++ b/Plugins/PipeReader.hs @@ -23,6 +23,6 @@ data PipeReader = PipeReader String String instance Exec PipeReader where alias (PipeReader _ a) = a start (PipeReader p _) cb = do - h <- openFile p ReadMode + h <- openFile p ReadWriteMode forever (hGetLineSafe h >>= cb) where forever a = a >> forever a -- cgit v1.2.3