xmonad-config/lib/Xmobar/Plugins/ClevoKeyboard.hs

27 lines
717 B
Haskell
Raw Normal View History

--------------------------------------------------------------------------------
-- | 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 Xmobar
2021-11-23 18:28:38 -05:00
import Xmobar.Plugins.BacklightCommon
2021-11-21 00:42:40 -05:00
import XMonad.Internal.DBus.Brightness.ClevoKeyboard
2021-11-21 17:54:00 -05:00
newtype ClevoKeyboard = ClevoKeyboard String deriving (Read, Show)
ckAlias :: String
ckAlias = "clevokeyboard"
instance Exec ClevoKeyboard where
2021-11-21 00:42:40 -05:00
alias (ClevoKeyboard _) = ckAlias
2021-11-27 13:24:13 -05:00
start (ClevoKeyboard icon) =
startBacklight matchSignalCK callGetBrightnessCK icon