summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/Xmobar/Plugins/Kbd.hsc2
-rw-r--r--src/lib/Xmobar/Plugins/MarqueePipeReader.hs3
-rw-r--r--src/lib/Xmobar/Plugins/PipeReader.hs2
-rw-r--r--src/lib/Xmobar/Utils.hs6
4 files changed, 4 insertions, 9 deletions
diff --git a/src/lib/Xmobar/Plugins/Kbd.hsc b/src/lib/Xmobar/Plugins/Kbd.hsc
index 24f07a3..5439785 100644
--- a/src/lib/Xmobar/Plugins/Kbd.hsc
+++ b/src/lib/Xmobar/Plugins/Kbd.hsc
@@ -20,8 +20,8 @@ import Graphics.X11.Xlib.Extras
import Foreign
import Foreign.C.Types
import Foreign.C.String
-import Xmobar.Plugins
import Control.Monad (forever)
+import Xmobar.Commands
import Xmobar.Utils (nextEvent')
import Data.List (isPrefixOf, findIndex)
import Data.Maybe (fromJust)
diff --git a/src/lib/Xmobar/Plugins/MarqueePipeReader.hs b/src/lib/Xmobar/Plugins/MarqueePipeReader.hs
index f106a21..32c6997 100644
--- a/src/lib/Xmobar/Plugins/MarqueePipeReader.hs
+++ b/src/lib/Xmobar/Plugins/MarqueePipeReader.hs
@@ -16,9 +16,8 @@ module Xmobar.Plugins.MarqueePipeReader where
import System.IO (openFile, IOMode(ReadWriteMode), Handle)
import Xmobar.System.Environment
-import Xmobar.Plugins (Exec(alias, start))
import Xmobar.Utils(hGetLineSafe)
-import Xmobar.Commands(tenthSeconds)
+import Xmobar.Commands(tenthSeconds, Exec(alias, start))
import System.Posix.Files (getFileStatus, isNamedPipe)
import Control.Concurrent(forkIO, threadDelay)
import Control.Concurrent.STM (TChan, atomically, writeTChan, tryReadTChan, newTChan)
diff --git a/src/lib/Xmobar/Plugins/PipeReader.hs b/src/lib/Xmobar/Plugins/PipeReader.hs
index 5e22408..ac59356 100644
--- a/src/lib/Xmobar/Plugins/PipeReader.hs
+++ b/src/lib/Xmobar/Plugins/PipeReader.hs
@@ -15,7 +15,7 @@
module Xmobar.Plugins.PipeReader where
import System.IO
-import Xmobar.Plugins(Exec(..))
+import Xmobar.Commands(Exec(..))
import Xmobar.Utils(hGetLineSafe)
import Xmobar.System.Environment(expandEnv)
import System.Posix.Files
diff --git a/src/lib/Xmobar/Utils.hs b/src/lib/Xmobar/Utils.hs
index eeb03f6..7e79514 100644
--- a/src/lib/Xmobar/Utils.hs
+++ b/src/lib/Xmobar/Utils.hs
@@ -17,7 +17,7 @@
------------------------------------------------------------------------------
-module Xmobar.Utils (expandHome, changeLoop, safeHead, hGetLineSafe, nextEvent')
+module Xmobar.Utils (expandHome, changeLoop, hGetLineSafe, nextEvent')
where
import Control.Monad
@@ -58,10 +58,6 @@ changeLoop s f = atomically s >>= go
guard (new /= old)
return new)
-safeHead :: [a] -> Maybe a
-safeHead [] = Nothing
-safeHead (x:_) = Just x
-
-- | A version of nextEvent that does not block in foreign calls.
nextEvent' :: Display -> XEventPtr -> IO ()
nextEvent' d p = do