taffybar-4.0.1: A desktop bar similar to xmobar, but with more GUI

Copyright | (c) Ivan A. Malison
License | BSD3-style (see LICENSE)
Maintainer | Ivan A. Malison
Stability | unstable
Portability | unportable
Safe Haskell | Safe-Inferred
Language | Haskell2010

System.Taffybar.Util

Description

Synopsis

- taffyStateDir :: IO FilePath
- liftReader :: Monad m => (m1 a -> m b) -> ReaderT r m1 a -> ReaderT r m b
- logPrintF :: (MonadIO m, Show t) => String -> Priority -> String -> t -> m ()
- logPrintFDebug :: (MonadIO m, Show t) => String -> String -> t -> m ()
- (??) :: Functor f => f (a -> b) -> a -> f b
- ifM :: Monad m => m Bool -> m a -> m a -> m a
- forkM :: Monad m => (c -> m a) -> (c -> m b) -> c -> m (a, b)
- maybeToEither :: b -> Maybe a -> Either b a
- truncateString :: Int -> String -> String
- truncateText :: Int -> Text -> Text
- runCommandFromPath :: MonadIO m => [String] -> m (Either String String)
- runCommand :: MonadIO m => FilePath -> [String] -> m (Either String String)
- foreverWithDelay :: (MonadIO m, RealFrac d) => d -> IO () -> m ThreadId
- foreverWithVariableDelay :: (MonadIO m, RealFrac d) => IO d -> m ThreadId
- liftActionTaker :: Monad m => ((a -> m a) -> m b) -> (a -> ReaderT c m a) -> ReaderT c m b
- maybeTCombine :: Monad m => m (Maybe a) -> m (Maybe a) -> m (Maybe a)
- (<||>) :: Monad m => (t -> m (Maybe a)) -> (t -> m (Maybe a)) -> t -> m (Maybe a)
- (<|||>) :: Monad m => (t -> t1 -> m (Maybe a)) -> (t -> t1 -> m (Maybe a)) -> t -> t1 -> m (Maybe a)
- catchGErrorsAsLeft :: IO a -> IO (Either GError a)
- catchGErrorsAsNothing :: IO a -> IO (Maybe a)
- safePixbufNewFromFile :: FilePath -> IO (Maybe Pixbuf)
- getPixbufFromFilePath :: FilePath -> IO (Maybe Pixbuf)
- downloadURIToPath :: Request -> FilePath -> IO ()
- postGUIASync :: IO () -> IO ()
- postGUISync :: IO () -> IO ()
- anyM :: Monad m => (a -> m Bool) -> [a] -> m Bool

# Documentation

taffyStateDir :: IO FilePath Source #

liftReader :: Monad m => (m1 a -> m b) -> ReaderT r m1 a -> ReaderT r m b Source #

logPrintF :: (MonadIO m, Show t) => String -> Priority -> String -> t -> m () Source #

logPrintFDebug :: (MonadIO m, Show t) => String -> String -> t -> m () Source #

(??) :: Functor f => f (a -> b) -> a -> f b infixl 4 Source #

ifM :: Monad m => m Bool -> m a -> m a -> m a Source #

forkM :: Monad m => (c -> m a) -> (c -> m b) -> c -> m (a, b) Source #

maybeToEither :: b -> Maybe a -> Either b a Source #

truncateString :: Int -> String -> String Source #

truncateText :: Int -> Text -> Text Source #

runCommandFromPath :: MonadIO m => [String] -> m (Either String String) Source #

runCommand :: MonadIO m => FilePath -> [String] -> m (Either String String) Source #

Run the provided command with the provided arguments.

foreverWithDelay :: (MonadIO m, RealFrac d) => d -> IO () -> m ThreadId Source #

Execute the provided IO action at the provided interval.

foreverWithVariableDelay :: (MonadIO m, RealFrac d) => IO d -> m ThreadId Source #

Execute the provided IO action, and use the value it returns to decide how long to wait until executing it again. The value returned by the action is interpreted as a number of seconds.

liftActionTaker :: Monad m => ((a -> m a) -> m b) -> (a -> ReaderT c m a) -> ReaderT c m b Source #

maybeTCombine :: Monad m => m (Maybe a) -> m (Maybe a) -> m (Maybe a) Source #

(<||>) :: Monad m => (t -> m (Maybe a)) -> (t -> m (Maybe a)) -> t -> m (Maybe a) infixl 3 Source #

(<|||>) :: Monad m => (t -> t1 -> m (Maybe a)) -> (t -> t1 -> m (Maybe a)) -> t -> t1 -> m (Maybe a) infixl 3 Source #

catchGErrorsAsLeft :: IO a -> IO (Either GError a) Source #

catchGErrorsAsNothing :: IO a -> IO (Maybe a) Source #

safePixbufNewFromFile :: FilePath -> IO (Maybe Pixbuf) Source #

getPixbufFromFilePath :: FilePath -> IO (Maybe Pixbuf) Source #

downloadURIToPath :: Request -> FilePath -> IO () Source #

postGUIASync :: IO () -> IO () Source #

postGUISync :: IO () -> IO () Source #

anyM :: Monad m => (a -> m Bool) -> [a] -> m Bool Source #