aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README25
-rw-r--r--README.md49
2 files changed, 49 insertions, 25 deletions
diff --git a/README b/README
deleted file mode 100644
index 4811b4f..0000000
--- a/README
+++ /dev/null
@@ -1,25 +0,0 @@
-brightnessctl 0.1.1 - read and control device brightness.
-
-Usage: brightnessctl [options] [operation] [value]
-
-Options:
- -l, --list list devices with available brightness controls.
- -q, --quiet suppress output.
- -p, --pretend do not perform write operations.
- -m, --machine-readable produce machine-readable output.
- -s, --save save previous state in a temporary file.
- -r, --restore restore previous saved state.
- -h, --help print this help.
- -d, --device=DEVICE specify device name.
- -c, --class=CLASS specify device class.
-
-Operations:
- g, get get current brightness of the device.
- m, max get maximum brightness of the device.
- s, set VALUE set brightness of the device.
-
-Valid values:
- specific value Example: 500
- percentage value Example: 50%
- specific delta Example: 50- or +10
- percentage delta Example: 50%- or +10%
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..a161e6d
--- /dev/null
+++ b/README.md
@@ -0,0 +1,49 @@
+# brightnessctl
+
+This program allows you read and control device brightness. Devices, by default, include are searched for in backlight and leds classes. If omitted, the first found device is selected.
+
+It can also preserve current brightness before applying the operation (allowing for usecases like disabling backlight on lid close).
+
+## Installation
+
+The program is available in:
+* [Fedora/EPEL](https://apps.fedoraproject.org/packages/brightnessctl)
+
+## Permissions
+
+Modifying brightness requires write permissions for device files. This can be accomplished (without using sudo/su/etc.) by either of the following means:
+1) installing brightnessctl as a suid binary (done by default)
+2) adding a similar udev rule (assuming your user is in `video` group for backlight and `input` group for leds):
+```
+ACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
+ACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
+ACTION=="add", SUBSYSTEM=="leds", RUN+="/bin/chgrp input /sys/class/leds/%k/brightness"
+ACTION=="add", SUBSYSTEM=="leds", RUN+="/bin/chmod g+w /sys/class/leds/%k/brightness"
+```
+
+## Usage
+```
+Usage: brightnessctl [options] [operation] [value]
+
+Options:
+ -l, --list list devices with available brightness controls.
+ -q, --quiet suppress output.
+ -p, --pretend do not perform write operations.
+ -m, --machine-readable produce machine-readable output.
+ -s, --save save previous state in a temporary file.
+ -r, --restore restore previous saved state.
+ -h, --help print this help.
+ -d, --device=DEVICE specify device name.
+ -c, --class=CLASS specify device class.
+
+Operations:
+ g, get get current brightness of the device.
+ m, max get maximum brightness of the device.
+ s, set VALUE set brightness of the device.
+
+Valid values:
+ specific value Example: 500
+ percentage value Example: 50%
+ specific delta Example: 50- or +10
+ percentage delta Example: 50%- or +10%
+ ```