diff options
author | Tomas Janousek <tomi@nomi.cz> | 2009-11-21 00:40:24 +0100 |
---|---|---|
committer | Tomas Janousek <tomi@nomi.cz> | 2009-11-21 00:40:24 +0100 |
commit | 01e09ea26fe616c7a9615d6b9c8c609081cfc822 (patch) | |
tree | b136ca76a46c86b9c79d7548659d11263d8da7a5 /scripts/xmonadpropwrite.hs | |
parent | f0ebea1d9095c151405f0fb45603dfdd721f12f7 (diff) | |
download | xmobar-01e09ea26fe616c7a9615d6b9c8c609081cfc822.tar.gz xmobar-01e09ea26fe616c7a9615d6b9c8c609081cfc822.tar.bz2 |
xmonadpropwrite: pass input unchanged, UTF8 not needed
Ignore-this: 54b2aa3a8c9fa566d10474b5b09d0017
darcs-hash:20091120234024-c9ff5-85bd22ba46c6c8be8c71b14ac01f5693ace0bb30.gz
Diffstat (limited to 'scripts/xmonadpropwrite.hs')
-rw-r--r-- | scripts/xmonadpropwrite.hs | 8 |
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 |