From 01e09ea26fe616c7a9615d6b9c8c609081cfc822 Mon Sep 17 00:00:00 2001 From: Tomas Janousek Date: Sat, 21 Nov 2009 00:40:24 +0100 Subject: xmonadpropwrite: pass input unchanged, UTF8 not needed Ignore-this: 54b2aa3a8c9fa566d10474b5b09d0017 darcs-hash:20091120234024-c9ff5-85bd22ba46c6c8be8c71b14ac01f5693ace0bb30.gz --- scripts/xmonadpropwrite.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/xmonadpropwrite.hs b/scripts/xmonadpropwrite.hs index 476a5db..f3f4a5d 100644 --- a/scripts/xmonadpropwrite.hs +++ b/scripts/xmonadpropwrite.hs @@ -14,7 +14,7 @@ import Control.Monad import Graphics.X11 import Graphics.X11.Xlib.Extras -import Codec.Binary.UTF8.String as UTF8 +import qualified Data.ByteString as B import Foreign.C (CChar) import System.IO import System.Environment @@ -31,11 +31,11 @@ main = do root <- rootWindow d (defaultScreen d) forever $ do - msg <- getLine + msg <- B.getLine changeProperty8 d root xlog ustring propModeReplace (encodeCChar msg) sync d True return () -encodeCChar :: String -> [CChar] -encodeCChar = map fromIntegral . UTF8.encode +encodeCChar :: B.ByteString -> [CChar] +encodeCChar = map fromIntegral . B.unpack -- cgit v1.2.3