33 lines
838 B
Haskell
33 lines
838 B
Haskell
--------------------------------------------------------------------------------
|
|
-- 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
|
|
|
|
import RIO
|
|
import qualified RIO.Text as T
|
|
import XMonad.Internal.DBus.Brightness.IntelBacklight
|
|
import Xmobar
|
|
import Xmobar.Plugins.BacklightCommon
|
|
|
|
newtype IntelBacklight = IntelBacklight T.Text deriving (Read, Show)
|
|
|
|
blAlias :: T.Text
|
|
blAlias = "intelbacklight"
|
|
|
|
instance Exec IntelBacklight where
|
|
alias (IntelBacklight _) = T.unpack blAlias
|
|
start (IntelBacklight icon) =
|
|
startBacklight
|
|
(Just "org.xmobar.intelbacklight")
|
|
(Just "intel_backlight.log")
|
|
matchSignalIB
|
|
callGetBrightnessIB
|
|
icon
|