ENH generalize keyboard stuff
This commit is contained in:
parent
98358983de
commit
71c875702f
|
@ -13,11 +13,10 @@ module XMonad.Internal.DBus.Brightness.ClevoKeyboard
|
|||
)
|
||||
where
|
||||
|
||||
import Control.Monad (when)
|
||||
import DBus
|
||||
import Data.Int (Int32)
|
||||
import Data.Internal.DBus
|
||||
import Data.Internal.Dependency
|
||||
import RIO
|
||||
import RIO.FilePath
|
||||
import XMonad.Internal.DBus.Brightness.Common
|
||||
import XMonad.Internal.IO
|
||||
|
@ -127,8 +126,12 @@ exportClevoKeyboard =
|
|||
clevoKeyboardControls :: Maybe SesClient -> BrightnessControls
|
||||
clevoKeyboardControls = brightnessControls xpfClevoBacklight clevoKeyboardConfig
|
||||
|
||||
callGetBrightnessCK :: SesClient -> IO (Maybe Brightness)
|
||||
callGetBrightnessCK :: MonadUnliftIO m => SesClient -> m (Maybe Brightness)
|
||||
callGetBrightnessCK = callGetBrightness clevoKeyboardConfig
|
||||
|
||||
matchSignalCK :: (Maybe Brightness -> IO ()) -> SesClient -> IO ()
|
||||
matchSignalCK
|
||||
:: MonadUnliftIO m
|
||||
=> (Maybe Brightness -> m ())
|
||||
-> SesClient
|
||||
-> m ()
|
||||
matchSignalCK = matchSignal clevoKeyboardConfig
|
||||
|
|
|
@ -14,9 +14,9 @@ module XMonad.Internal.DBus.Brightness.IntelBacklight
|
|||
where
|
||||
|
||||
import DBus
|
||||
import Data.Int (Int32)
|
||||
import Data.Internal.DBus
|
||||
import Data.Internal.Dependency
|
||||
import RIO
|
||||
import RIO.FilePath
|
||||
import XMonad.Internal.DBus.Brightness.Common
|
||||
import XMonad.Internal.IO
|
||||
|
@ -110,8 +110,12 @@ exportIntelBacklight =
|
|||
intelBacklightControls :: Maybe SesClient -> BrightnessControls
|
||||
intelBacklightControls = brightnessControls xpfIntelBacklight intelBacklightConfig
|
||||
|
||||
callGetBrightnessIB :: SesClient -> IO (Maybe Brightness)
|
||||
callGetBrightnessIB :: MonadUnliftIO m => SesClient -> m (Maybe Brightness)
|
||||
callGetBrightnessIB = callGetBrightness intelBacklightConfig
|
||||
|
||||
matchSignalIB :: (Maybe Brightness -> IO ()) -> SesClient -> IO ()
|
||||
matchSignalIB
|
||||
:: MonadUnliftIO m
|
||||
=> (Maybe Brightness -> m ())
|
||||
-> SesClient
|
||||
-> m ()
|
||||
matchSignalIB = matchSignal intelBacklightConfig
|
||||
|
|
Loading…
Reference in New Issue