31 lines
842 B
Haskell
31 lines
842 B
Haskell
{-# LANGUAGE OverloadedStrings #-}
|
|
|
|
--------------------------------------------------------------------------------
|
|
-- | 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
|
|
|
|
import Xmobar
|
|
|
|
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
|
|
start (IntelBacklight icon) =
|
|
startBacklight matchSignalIB callGetBrightnessIB icon
|