lightweight X11 utility to dim the screen and/or keyboard backlight when idle
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

use mandoc to produce README.md

+103 -32
+4 -1
Makefile
··· 28 28 $(OBJS): *.c 29 29 $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ 30 30 31 + README.md: xdimmer.1 32 + mandoc -T markdown xdimmer.1 > README.md 33 + 31 34 install: all 32 35 mkdir -p $(BINDIR) 33 36 $(INSTALL_PROGRAM) $(PROG) $(BINDIR) ··· 39 42 40 43 release: all 41 44 @mkdir $(PROG)-${VERS} 42 - @cp Makefile *.c $(PROG)-$(VERS)/ 45 + @cp Makefile README.md *.c $(PROG)-$(VERS)/ 43 46 @tar -czf ../$(PROG)-$(VERS).tar.gz $(PROG)-$(VERS) 44 47 @rm -rf $(PROG)-$(VERS)/ 45 48 @echo "made release ${VERS}"
-31
README
··· 1 - xdimmer 2 - by joshua stein <jcs@jcs.org> 3 - =============================================================================== 4 - 5 - xdimmer is a lightweight X11 utility to dim the screen backlight when idle, 6 - then brighten it back up when mouse or keyboard activity is detected. This 7 - power-saving behavior is common on other operating systems and in bloated 8 - X11 frameworks like GNOME. 9 - 10 - xdimmer works independently of any screen saver/locker such as xidle or 11 - xautolock, so it is free to dim the screen prior to the existing locker 12 - firing, and brighten it back up once movement is detected while the screen 13 - is still locked. 14 - 15 - 16 - Implementation 17 - =============================================================================== 18 - 19 - xdimmer uses the XSync extension to create an alarm on the IDLETIME system 20 - counter. When the idle counter reaches the requested interval, it fires an X 21 - event, causing xdimmer to dim the screen to the requested percentage (in 22 - graceful steps). 23 - 24 - Screen dimming is done using Xrandr. On OpenBSD, if Xrandr does not present a 25 - RR_PROPERTY_BACKLIGHT property, xdimmer will try the wscons display.brightness 26 - ioctl. 27 - 28 - While the screen is dim, another alarm is created to fire when the XSync 29 - idle counter resets due to mouse or keyboard activity. When this alarm 30 - fires, the backlight is returned to its previous level (also in steps, but 31 - quicker).
+99
README.md
··· 1 + XDIMMER(1) - General Commands Manual 2 + 3 + # NAME 4 + 5 + **xdimmer** - dim the screen and/or the keyboard backlight when idle or when ambient 6 + light changes 7 + 8 + # SYNOPSIS 9 + 10 + **xdimmer** 11 + \[**-a**] 12 + \[**-d**] 13 + \[**-k**] 14 + \[**-n**] 15 + \[**-p**&nbsp;*percent*] 16 + \[**-s**&nbsp;*steps*] 17 + \[**-t**&nbsp;*timeout*] 18 + 19 + # DESCRIPTION 20 + 21 + **xdimmer** 22 + waits 23 + *timeout* 24 + number of seconds and if no keyboard or mouse input is detected, the screen 25 + backlight is dimmed to 26 + *percent* 27 + in 28 + *steps* 29 + steps, unless the 30 + *-n* 31 + option was specified. 32 + Once keyboard or mouse input is detected, the screen backlight is restored 33 + to its previous brightness value. 34 + 35 + On OpenBSD, if the 36 + *-k* 37 + option is used, the keyboard backlight is also dimmed to zero and restored 38 + upon movement via the 39 + wscons(4) 40 + interface. 41 + 42 + Also on OpenBSD, if the 43 + *-a* 44 + option is used and an ambient light sensor device is located via 45 + sysctl(8), 46 + screen backlight (and keyboard backlight if 47 + *-k* 48 + is used) is dimmed or brightened based on lux readings. 49 + 50 + # OPTIONS 51 + 52 + **-a** 53 + 54 + > Change backlights according to ambient light sensor lux readings. 55 + > Currently only supported on OpenBSD. 56 + 57 + **-d** 58 + 59 + > Print debugging messages to stdout. 60 + 61 + **-k** 62 + 63 + > Affect the keyboard backlight as well as the screen backlight. 64 + > Currently only supported on OpenBSD. 65 + 66 + **-n** 67 + 68 + > Do not adjust the screen backlight (can only be used if 69 + > *-k* 70 + > is used). 71 + 72 + **-p** *percent* 73 + 74 + > Absolute brightness value to which the backlight is dimmed. 75 + > The default is 76 + > `10` 77 + > percent. 78 + 79 + **-t** *steps* 80 + 81 + > Number of steps to take while decrementing backlight. 82 + > The default is 83 + > `20` 84 + > steps. 85 + 86 + **-t** *timeout* 87 + 88 + > Number of seconds to wait without receiving input before dimming. 89 + > The default is 90 + > `120` 91 + > seconds. 92 + 93 + # AUTHORS 94 + 95 + **xdimmer** 96 + was written by 97 + joshua stein &lt;[jcs@jcs.org](mailto:jcs@jcs.org)&gt;. 98 + 99 + OpenBSD 6.1 - April 2, 2017