REF clean dead code
This commit is contained in:
parent
8c4683faa1
commit
e3a7191ed9
|
@ -33,16 +33,12 @@ memAdded = memberName_ "InterfacesAdded"
|
||||||
memRemoved :: MemberName
|
memRemoved :: MemberName
|
||||||
memRemoved = memberName_ "InterfacesRemoved"
|
memRemoved = memberName_ "InterfacesRemoved"
|
||||||
|
|
||||||
-- dbusDep :: MemberName -> Dependency
|
|
||||||
-- dbusDep m = DBusEndpoint (Bus True bus) (Endpoint path interface $ Signal_ m)
|
|
||||||
dbusDep :: MemberName -> Endpoint
|
dbusDep :: MemberName -> Endpoint
|
||||||
dbusDep m = Endpoint bus path interface $ Signal_ m
|
dbusDep m = Endpoint bus path interface $ Signal_ m
|
||||||
|
|
||||||
-- addedDep :: Dependency
|
|
||||||
addedDep :: Endpoint
|
addedDep :: Endpoint
|
||||||
addedDep = dbusDep memAdded
|
addedDep = dbusDep memAdded
|
||||||
|
|
||||||
-- removedDep :: Dependency
|
|
||||||
removedDep :: Endpoint
|
removedDep :: Endpoint
|
||||||
removedDep = dbusDep memRemoved
|
removedDep = dbusDep memRemoved
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,6 @@ stateFileDep = pathRW stateFile
|
||||||
brightnessFileDep :: Dependency
|
brightnessFileDep :: Dependency
|
||||||
brightnessFileDep = pathR brightnessFile
|
brightnessFileDep = pathR brightnessFile
|
||||||
|
|
||||||
-- clevoKeyboardSignalDep :: Dependency
|
|
||||||
clevoKeyboardSignalDep :: Endpoint
|
clevoKeyboardSignalDep :: Endpoint
|
||||||
clevoKeyboardSignalDep = signalDep clevoKeyboardConfig
|
clevoKeyboardSignalDep = signalDep clevoKeyboardConfig
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,6 @@ callGetBrightness BrightnessConfig { bcPath = p, bcInterface = i } client = do
|
||||||
reply <- callMethod client xmonadBusName p i memGet
|
reply <- callMethod client xmonadBusName p i memGet
|
||||||
return $ either (const Nothing) bodyGetBrightness reply
|
return $ either (const Nothing) bodyGetBrightness reply
|
||||||
|
|
||||||
-- signalDep :: BrightnessConfig a b -> Dependency
|
|
||||||
signalDep :: BrightnessConfig a b -> Endpoint
|
signalDep :: BrightnessConfig a b -> Endpoint
|
||||||
signalDep BrightnessConfig { bcPath = p, bcInterface = i } =
|
signalDep BrightnessConfig { bcPath = p, bcInterface = i } =
|
||||||
Endpoint xmonadBusName p i $ Signal_ memCur
|
Endpoint xmonadBusName p i $ Signal_ memCur
|
||||||
|
|
|
@ -95,7 +95,6 @@ curFileDep = pathRW curFile
|
||||||
maxFileDep :: Dependency
|
maxFileDep :: Dependency
|
||||||
maxFileDep = pathR maxFile
|
maxFileDep = pathR maxFile
|
||||||
|
|
||||||
-- intelBacklightSignalDep :: Dependency
|
|
||||||
intelBacklightSignalDep :: Endpoint
|
intelBacklightSignalDep :: Endpoint
|
||||||
intelBacklightSignalDep = signalDep intelBacklightConfig
|
intelBacklightSignalDep = signalDep intelBacklightConfig
|
||||||
|
|
||||||
|
|
|
@ -2,46 +2,16 @@
|
||||||
-- | Common internal DBus functions
|
-- | Common internal DBus functions
|
||||||
|
|
||||||
module XMonad.Internal.DBus.Common
|
module XMonad.Internal.DBus.Common
|
||||||
-- ( callMethod
|
|
||||||
-- , callMethod'
|
|
||||||
( addMatchCallback
|
( addMatchCallback
|
||||||
-- , xmonadBus
|
|
||||||
, xmonadBusName
|
, xmonadBusName
|
||||||
-- , xDbusDep
|
|
||||||
-- , initControls
|
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import DBus
|
import DBus
|
||||||
import DBus.Client
|
import DBus.Client
|
||||||
|
|
||||||
-- import XMonad.Internal.Dependency
|
|
||||||
|
|
||||||
xmonadBusName :: BusName
|
xmonadBusName :: BusName
|
||||||
xmonadBusName = busName_ "org.xmonad"
|
xmonadBusName = busName_ "org.xmonad"
|
||||||
|
|
||||||
-- xmonadBus :: Bus
|
|
||||||
-- xmonadBus = Bus False xmonadBusName
|
|
||||||
|
|
||||||
-- xDbusDep :: ObjectPath -> InterfaceName -> DBusMember -> Dependency
|
|
||||||
-- xDbusDep o i m = DBusEndpoint xmonadBus $ Endpoint o i m
|
|
||||||
|
|
||||||
-- -- | Call a method and return its result if successful
|
|
||||||
-- callMethod :: MethodCall -> IO (Maybe [Variant])
|
|
||||||
-- callMethod mc = do
|
|
||||||
-- client <- connectSession
|
|
||||||
-- r <- callMethod' client (Just xmonadBusName) mc
|
|
||||||
-- disconnect client
|
|
||||||
-- return r
|
|
||||||
|
|
||||||
-- callMethod' :: Client -> Maybe BusName -> MethodCall -> IO (Maybe [Variant])
|
|
||||||
-- callMethod' client bn mc = do
|
|
||||||
-- -- TODO handle clienterrors here
|
|
||||||
-- reply <- call client mc { methodCallDestination = bn }
|
|
||||||
-- -- TODO not all methods warrant that we wait for a reply? (see callNoReply)
|
|
||||||
-- return $ case reply of
|
|
||||||
-- Left _ -> Nothing
|
|
||||||
-- Right ret -> Just $ methodReturnBody ret
|
|
||||||
|
|
||||||
-- | Bind a callback to a signal match rule
|
-- | Bind a callback to a signal match rule
|
||||||
addMatchCallback :: MatchRule -> ([Variant] -> IO ()) -> IO SignalHandler
|
addMatchCallback :: MatchRule -> ([Variant] -> IO ()) -> IO SignalHandler
|
||||||
addMatchCallback rule cb = do
|
addMatchCallback rule cb = do
|
||||||
|
|
|
@ -9,7 +9,6 @@ module XMonad.Internal.DBus.Control
|
||||||
, getDBusClient
|
, getDBusClient
|
||||||
, stopXMonadService
|
, stopXMonadService
|
||||||
, pathExists
|
, pathExists
|
||||||
-- , xmonadBus
|
|
||||||
, disconnect
|
, disconnect
|
||||||
) where
|
) where
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue