ENH use rio for xmobar plugins

This commit is contained in:
Nathan Dwarshuis 2022-12-31 22:22:36 -05:00
parent 39bd464ca1
commit f6c0596716
2 changed files with 4 additions and 4 deletions

View File

@ -13,8 +13,8 @@ import Xmobar.Plugins.Common
startBacklight
:: (MonadUnliftIO m, RealFrac a)
=> ((Maybe a -> m ()) -> SesClient -> m ())
-> (SesClient -> m (Maybe a))
=> ((Maybe a -> RIO SimpleApp ()) -> SesClient -> RIO SimpleApp ())
-> (SesClient -> RIO SimpleApp (Maybe a))
-> T.Text
-> Callback
-> m ()

View File

@ -70,6 +70,6 @@ displayMaybe' cb = maybe (liftIO $ cb $ T.unpack na)
withDBusClientConnection
:: (MonadUnliftIO m, SafeClient c)
=> Callback
-> (c -> m ())
-> (c -> RIO SimpleApp ())
-> m ()
withDBusClientConnection cb f = displayMaybe' cb f =<< getDBusClient
withDBusClientConnection cb f = runSimpleApp $ displayMaybe' cb f =<< getDBusClient