diff --git a/lib/Xmobar/Plugins/Device.hs b/lib/Xmobar/Plugins/Device.hs index 42e992b..1c309ae 100644 --- a/lib/Xmobar/Plugins/Device.hs +++ b/lib/Xmobar/Plugins/Device.hs @@ -12,11 +12,11 @@ module Xmobar.Plugins.Device ) where -import Control.Monad import DBus import Data.Internal.DBus import Data.Internal.Dependency import Data.Word +import RIO import qualified RIO.Text as T import XMonad.Internal.Command.Desktop import XMonad.Internal.DBus.Common @@ -45,7 +45,7 @@ devDep = Endpoint networkManagerPkgs networkManagerBus nmPath nmInterface $ Method_ getByIP -getDevice :: SysClient -> T.Text -> IO (Maybe ObjectPath) +getDevice :: MonadUnliftIO m => SysClient -> T.Text -> m (Maybe ObjectPath) getDevice sys iface = bodyToMaybe <$> callMethod' sys mc where mc = @@ -53,7 +53,7 @@ getDevice sys iface = bodyToMaybe <$> callMethod' sys mc { methodCallBody = [toVariant iface] } -getDeviceConnected :: ObjectPath -> SysClient -> IO [Variant] +getDeviceConnected :: MonadUnliftIO m => ObjectPath -> SysClient -> m [Variant] getDeviceConnected path = callPropertyGet networkManagerBus path nmDeviceInterface $ memberName_ $