This module allows you to manage the backlight natively with StumpWM.
None. This is done natively.
Put the following in your ~/.stumpwmrc
:
(load-module "stump-backlight")
And enjoy the backlight buttons working.
stump-backlight exposes a few things:
- The
*scale*
variable: defaults to 10. It defines the scale of the backlight. If you want more granularity than 10 steps, increase this variable. - The
*default-percent*
variable: defaults to 50. It defines the default percentage of the backlight. Due to underlying technology issues, the percentage is managed separately from the real one, so this lets you set it at startup. - The
(update output)
function: it takes the values from the variables and applies the backlight. It takes one argument: the output (aka monitor) to apply the update on. - The
(current-output)
function: it returns the output (aka monitor) of the currently focused window. Useful to pass to the previous function. - 2 commands:
backlight-increase
andbacklight-decrease
. They increase or decrease based on the scale and apply the backlight.
The 2 commands are bound to those keys:
(define-key *root-map* (kbd "XF86MonBrightnessUp") "backlight-increase")
(define-key *root-map* (kbd "XF86MonBrightnessDown") "backlight-decrease")