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

31 lines
842 B
Haskell
Raw Normal View History

{-# LANGUAGE OverloadedStrings #-}
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
import qualified RIO.Text as T
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 T.Text deriving (Read, Show)
blAlias :: T.Text
blAlias = "intelbacklight"
instance Exec IntelBacklight where
alias (IntelBacklight _) = T.unpack blAlias
2021-11-27 13:24:13 -05:00
start (IntelBacklight icon) =
startBacklight matchSignalIB callGetBrightnessIB icon