-- | Get the name of a string property and returns it as a 'Maybe'.
getStringProp :: (MonadIO m) => Display -> StringProp -> m (Maybe [Char])
getStringProp dpy prop =
  withStringProp prop dpy $ \rootw a -> do
    p <- io $ getWindowProperty8 dpy a rootw
    return $ map castCCharToChar <$> p

-- | Given a property name, returns its contents as a list. It uses the empty
-- list as default value.
getStringProp :: (MonadIO m) => Display -> StringProp -> m (Maybe [Char])
getStringProp dpy prop =
  withStringProp prop dpy $ \rootw a -> do
    p <- io $ getWindowProperty8 dpy a rootw
    return $ map castCCharToChar <$> p

-- | Given a property name, returns its contents as a list. It uses the empty
-- list as default value.
getStringProp dpy prop =
  withStringProp prop dpy $ \rootw a -> do
    p <- io $ getWindowProperty8 dpy a rootw
    return $ map castCCharToChar <$> p

-- | Given a property name, returns its contents as a list. It uses the empty
-- list as default value.