stumpwm.stumpwm-contrib/util/stump-backlight/README.org

43 lines
1.4 KiB
Org Mode

* 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=:
#+begin_src lisp
(load-module "stump-backlight")
#+end_src
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:
#+begin_src lisp
(define-key *root-map* (kbd "XF86MonBrightnessUp") "backlight-increase")
(define-key *root-map* (kbd "XF86MonBrightnessDown") "backlight-decrease")
#+end_src