summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTomas Janousek <tomi@nomi.cz>2009-11-21 00:40:24 +0100
committerTomas Janousek <tomi@nomi.cz>2009-11-21 00:40:24 +0100
commit01e09ea26fe616c7a9615d6b9c8c609081cfc822 (patch)
treeb136ca76a46c86b9c79d7548659d11263d8da7a5
parentf0ebea1d9095c151405f0fb45603dfdd721f12f7 (diff)
downloadxmobar-01e09ea26fe616c7a9615d6b9c8c609081cfc822.tar.gz
xmobar-01e09ea26fe616c7a9615d6b9c8c609081cfc822.tar.bz2
xmonadpropwrite: pass input unchanged, UTF8 not needed
Ignore-this: 54b2aa3a8c9fa566d10474b5b09d0017 darcs-hash:20091120234024-c9ff5-85bd22ba46c6c8be8c71b14ac01f5693ace0bb30.gz
-rw-r--r--scripts/xmonadpropwrite.hs8
1 files 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