changeset 19:0de3886f98ad

misc: minor updates
author David Demelier <markand@malikania.fr>
date Wed, 29 Jan 2020 13:09:21 +0100
parents 281cc3a22f1b
children 232b390f1682
files INSTALL.md LICENSE.md Makefile README.md backlight.1 backlight.c
diffstat 6 files changed, 21 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/INSTALL.md	Wed Jan 29 06:03:40 2020 +0100
+++ b/INSTALL.md	Wed Jan 29 13:09:21 2020 +0100
@@ -39,7 +39,7 @@
 Also, you will need the ACPI video module, add the following to your
 */boot/loader.conf*:
 
-    acpi_video_load=YES
+	acpi_video_load=YES
 
 Alternatively, you can compile this module into the kernel.
 
--- a/LICENSE.md	Wed Jan 29 06:03:40 2020 +0100
+++ b/LICENSE.md	Wed Jan 29 13:09:21 2020 +0100
@@ -1,7 +1,7 @@
 backlight LICENSE
 =================
 
-Copyright (c) 2010-2019 David Demelier <markand@malikania.fr>
+Copyright (c) 2010-2020 David Demelier <markand@malikania.fr>
 
 Permission to use, copy, modify, and/or distribute this software for any
 purpose with or without fee is hereby granted, provided that the above
--- a/Makefile	Wed Jan 29 06:03:40 2020 +0100
+++ b/Makefile	Wed Jan 29 13:09:21 2020 +0100
@@ -1,7 +1,7 @@
 #
 # Makefile for backlight
 #
-# Copyright (c) 2010-2019 David Demelier <markand@malikania.fr>
+# Copyright (c) 2010-2020 David Demelier <markand@malikania.fr>
 #
 # Permission to use, copy, modify, and distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
@@ -18,7 +18,7 @@
 
 .POSIX:
 
-CC=             clang
+CC=             gcc
 CFLAGS=         -Wall -Wextra -pedantic -std=c11 -DNDEBUG -D_XOPEN_SOURCE=700 ${EXTRA_CFLAGS}
 LDFLAGS=        ${EXTRA_LDFLAGS}
 LDLIBS=         ${EXTRA_LDLIBS}
--- a/README.md	Wed Jan 29 06:03:40 2020 +0100
+++ b/README.md	Wed Jan 29 13:09:21 2020 +0100
@@ -1,7 +1,7 @@
 backlight
 =========
 
-This tool adjust your laptop brightness using ACPI.
+This tool adjust your laptop brightness using direct ACPI manipulation.
 
 It has been designed for broken ACPI (e.g. HP) where fn-keys do not work,
 instead, you can map these keys to call this tool.
@@ -9,10 +9,14 @@
 Usage
 -----
 
-The backlight tool supports two commands, `up` and `down` which increment and
-decrement backlight respectively.
+The backlight tool supports several commands:
+
+- increase and decrease: respectively adjust the brightness to the next value,
+- get: get the current brightness in 0-100 percentage value.
+- set: set the current brightness in 0-100 percentage value.
 
 Example:
 
-    backlight up
-    backlight down
+	backlight increase
+	backlight set 90
+	backlight get
--- a/backlight.1	Wed Jan 29 06:03:40 2020 +0100
+++ b/backlight.1	Wed Jan 29 13:09:21 2020 +0100
@@ -1,5 +1,5 @@
 .\"
-.\" Copyright (c) 2010-2019 David Demelier <markand@malikania.fr>
+.\" Copyright (c) 2010-2020 David Demelier <markand@malikania.fr>
 .\"
 .\" Permission to use, copy, modify, and/or distribute this software for any
 .\" purpose with or without fee is hereby granted, provided that the above
@@ -62,6 +62,9 @@
 as non-root user if you create appropriate udev rules to make files under
 .Pa /sys/class/backlight
 writable by a group or per user.
+.Pp
+The source package comes with an example of udev rule that can be installed in
+.Pa /usr/lib/udev/rules.d .
 .Ss FreeBSD
 Access to brightness under FreeBSD requires super-user, you may need to run
 .Nm
@@ -69,7 +72,9 @@
 .Pp
 You also need to load
 .Xr acpi_video 4
-module at boot.
+module at boot by adding
+.Sy acpi_video_load="YES" in
+.Pa /boot/loader.conf .
 .\" AUTHORS
 .Sh AUTHORS
 .Nm
--- a/backlight.c	Wed Jan 29 06:03:40 2020 +0100
+++ b/backlight.c	Wed Jan 29 13:09:21 2020 +0100
@@ -1,7 +1,7 @@
 /*
  * main.c -- adjust laptop backlight using ACPI
  *
- * Copyright (c) 2010-2019 David Demelier <markand@malikania.fr>
+ * Copyright (c) 2010-2020 David Demelier <markand@malikania.fr>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above