XMonad.Prompt.Unicode: use spawnPipe instead of runProcessWithInput

This commit is contained in:
Nick Hu
2020-10-13 20:39:21 +01:00
parent 02baee5f7e
commit 9c09072843
2 changed files with 9 additions and 2 deletions

View File

@@ -112,8 +112,10 @@ mkUnicodePrompt prog args unicodeDataFilename config =
let m = searchUnicode entries s
return . map (\(c,d) -> printf "%s %s" [c] d) $ take 20 m
paste [] = return ()
paste (c:_) = do
runProcessWithInput prog args [c]
paste (c:_) = liftIO $ do
handle <- spawnPipe $ unwords $ prog : args
hPutChar handle c
hClose handle
return ()
-- | Prompt the user for a Unicode character to be inserted into the paste buffer of the X server.