33 lines
813 B
Haskell
33 lines
813 B
Haskell
--------------------------------------------------------------------------------
|
|
-- Clevo Keyboard plugin
|
|
--
|
|
-- Use the custom DBus interface exported by the XMonad process so I can react
|
|
-- to signals spawned by commands
|
|
|
|
module Xmobar.Plugins.ClevoKeyboard
|
|
( ClevoKeyboard (..)
|
|
, ckAlias
|
|
)
|
|
where
|
|
|
|
import RIO
|
|
import qualified RIO.Text as T
|
|
import XMonad.Internal.DBus.Brightness.ClevoKeyboard
|
|
import Xmobar
|
|
import Xmobar.Plugins.BacklightCommon
|
|
|
|
newtype ClevoKeyboard = ClevoKeyboard T.Text deriving (Read, Show)
|
|
|
|
ckAlias :: T.Text
|
|
ckAlias = "clevokeyboard"
|
|
|
|
instance Exec ClevoKeyboard where
|
|
alias (ClevoKeyboard _) = T.unpack ckAlias
|
|
start (ClevoKeyboard icon) =
|
|
startBacklight
|
|
(Just "org.xmobar.clevo")
|
|
(Just "clevo_kbd.log")
|
|
matchSignalCK
|
|
callGetBrightnessCK
|
|
icon
|