···11-xdimmer
22-by joshua stein <jcs@jcs.org>
33-===============================================================================
44-55-xdimmer is a lightweight X11 utility to dim the screen backlight when idle,
66-then brighten it back up when mouse or keyboard activity is detected. This
77-power-saving behavior is common on other operating systems and in bloated
88-X11 frameworks like GNOME.
99-1010-xdimmer works independently of any screen saver/locker such as xidle or
1111-xautolock, so it is free to dim the screen prior to the existing locker
1212-firing, and brighten it back up once movement is detected while the screen
1313-is still locked.
1414-1515-1616-Implementation
1717-===============================================================================
1818-1919-xdimmer uses the XSync extension to create an alarm on the IDLETIME system
2020-counter. When the idle counter reaches the requested interval, it fires an X
2121-event, causing xdimmer to dim the screen to the requested percentage (in
2222-graceful steps).
2323-2424-Screen dimming is done using Xrandr. On OpenBSD, if Xrandr does not present a
2525-RR_PROPERTY_BACKLIGHT property, xdimmer will try the wscons display.brightness
2626-ioctl.
2727-2828-While the screen is dim, another alarm is created to fire when the XSync
2929-idle counter resets due to mouse or keyboard activity. When this alarm
3030-fires, the backlight is returned to its previous level (also in steps, but
3131-quicker).
+99
README.md
···11+XDIMMER(1) - General Commands Manual
22+33+# NAME
44+55+**xdimmer** - dim the screen and/or the keyboard backlight when idle or when ambient
66+light changes
77+88+# SYNOPSIS
99+1010+**xdimmer**
1111+\[**-a**]
1212+\[**-d**]
1313+\[**-k**]
1414+\[**-n**]
1515+\[**-p** *percent*]
1616+\[**-s** *steps*]
1717+\[**-t** *timeout*]
1818+1919+# DESCRIPTION
2020+2121+**xdimmer**
2222+waits
2323+*timeout*
2424+number of seconds and if no keyboard or mouse input is detected, the screen
2525+backlight is dimmed to
2626+*percent*
2727+in
2828+*steps*
2929+steps, unless the
3030+*-n*
3131+option was specified.
3232+Once keyboard or mouse input is detected, the screen backlight is restored
3333+to its previous brightness value.
3434+3535+On OpenBSD, if the
3636+*-k*
3737+option is used, the keyboard backlight is also dimmed to zero and restored
3838+upon movement via the
3939+wscons(4)
4040+interface.
4141+4242+Also on OpenBSD, if the
4343+*-a*
4444+option is used and an ambient light sensor device is located via
4545+sysctl(8),
4646+screen backlight (and keyboard backlight if
4747+*-k*
4848+is used) is dimmed or brightened based on lux readings.
4949+5050+# OPTIONS
5151+5252+**-a**
5353+5454+> Change backlights according to ambient light sensor lux readings.
5555+> Currently only supported on OpenBSD.
5656+5757+**-d**
5858+5959+> Print debugging messages to stdout.
6060+6161+**-k**
6262+6363+> Affect the keyboard backlight as well as the screen backlight.
6464+> Currently only supported on OpenBSD.
6565+6666+**-n**
6767+6868+> Do not adjust the screen backlight (can only be used if
6969+> *-k*
7070+> is used).
7171+7272+**-p** *percent*
7373+7474+> Absolute brightness value to which the backlight is dimmed.
7575+> The default is
7676+> `10`
7777+> percent.
7878+7979+**-t** *steps*
8080+8181+> Number of steps to take while decrementing backlight.
8282+> The default is
8383+> `20`
8484+> steps.
8585+8686+**-t** *timeout*
8787+8888+> Number of seconds to wait without receiving input before dimming.
8989+> The default is
9090+> `120`
9191+> seconds.
9292+9393+# AUTHORS
9494+9595+**xdimmer**
9696+was written by
9797+joshua stein <[jcs@jcs.org](mailto:jcs@jcs.org)>.
9898+9999+OpenBSD 6.1 - April 2, 2017