From 80913aeed46fc607f057a77ffdd884b5db77a0bc Mon Sep 17 00:00:00 2001 From: Pavan Rikhi Date: Thu, 9 Apr 2020 13:51:37 -0400 Subject: Add a HandleReader Plugin This adds a new `HandleReader` plugin, which displays data from a Haskell `Handle`. This is really only useful if you are running xmobar from within another Haskell program, but lets you avoid the mechanics of creating a named pipe with the proper file permissions. Instead, you can use `System.Process.createPipe` to make a pair of read & write Handles. If you pass the read handle to HandleReader, you can use hPutStr on the write Handle to send data to xmobar from your application code. --- src/Xmobar.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Xmobar.hs') diff --git a/src/Xmobar.hs b/src/Xmobar.hs index 491aa8d..d2e4126 100644 --- a/src/Xmobar.hs +++ b/src/Xmobar.hs @@ -32,6 +32,7 @@ module Xmobar (xmobar , module Xmobar.Plugins.DateZone #endif , module Xmobar.Plugins.EWMH + , module Xmobar.Plugins.HandleReader , module Xmobar.Plugins.Kbd , module Xmobar.Plugins.Locks #ifdef INOTIFY @@ -57,6 +58,7 @@ import Xmobar.Plugins.Date import Xmobar.Plugins.DateZone #endif import Xmobar.Plugins.EWMH +import Xmobar.Plugins.HandleReader import Xmobar.Plugins.Kbd import Xmobar.Plugins.Locks #ifdef INOTIFY -- cgit v1.2.3