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

27 lines
733 B
Haskell
Raw Normal View History

2020-04-01 22:06:00 -04:00
--------------------------------------------------------------------------------
-- | Intel backlight plugin
--
-- Use the custom DBus interface exported by the XMonad process so I can react
-- to signals spawned by commands
module Xmobar.Plugins.IntelBacklight
( IntelBacklight(..)
, blAlias
) where
2020-04-01 20:17:47 -04:00
import Xmobar
2021-11-23 18:28:38 -05:00
import Xmobar.Plugins.BacklightCommon
import XMonad.Internal.DBus.Brightness.IntelBacklight
newtype IntelBacklight = IntelBacklight String deriving (Read, Show)
blAlias :: String
blAlias = "intelbacklight"
instance Exec IntelBacklight where
alias (IntelBacklight _) = blAlias
2021-11-23 18:28:38 -05:00
start (IntelBacklight icon) cb =
startBacklight matchSignalIB callGetBrightnessIB icon cb