stumpwm.stumpwm-contrib/util/stump-backlight
2023-04-04 21:36:06 -04:00
..
backlight.lisp Fixed some minor bugs in backlight and added ability to use CLI utils 2023-04-04 21:36:06 -04:00
package.lisp Make stump-backlight work correctly on multiple monitors. 2021-01-21 13:19:41 -05:00
README.org Make stump-backlight work correctly on multiple monitors. 2021-01-21 13:19:41 -05:00
stump-backlight.asd Add the stump-backlight module. 2021-01-20 18:22:55 -05:00

stump-backlight

This module allows you to manage the backlight natively with StumpWM.

Requirements

None. This is done natively.

Usage

Put the following in your ~/.stumpwmrc:

  (load-module "stump-backlight")

And enjoy the backlight buttons working.

Details

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 and backlight-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")