aboutsummaryrefslogtreecommitdiffstats
path: root/brightness.1.scd
diff options
context:
space:
mode:
Diffstat (limited to 'brightness.1.scd')
-rw-r--r--brightness.1.scd71
1 files changed, 71 insertions, 0 deletions
diff --git a/brightness.1.scd b/brightness.1.scd
new file mode 100644
index 0000000..8804032
--- /dev/null
+++ b/brightness.1.scd
@@ -0,0 +1,71 @@
+BRIGHTNESS(1)
+
+# NAME
+
+brightness - adjust brightness via sysfs
+
+# SYNOPSIS
+
+*brightness* [*-h*] [*-m* _minimum_[*%*]] [*-M* _maximum_[*%*]] _backlight_ [*+*|*-*]_adjustment_
+
+# DESCRIPTION
+
+The *brightness* utility is used to perform log-scale brightness adjustments of
+a sysfs exposed backlight.
+
+The options are as follows:
+
+*-m* _minimum_[*%*] or *--min* _minimum_[*%*]
+ Specify an artificial minimum raw value or log-scale percentage.
+
+*-M* _maximum_[*%*] or *--max* _maximum_[*%*]
+ Specify an artificial maximum raw value or log-scale percentage.
+
+*-h* or *--help*
+ Print out the *brightness* help text and exit.
+
+_backlight_ must be the path to the directory of a backlight exposed over sysfs.
+
+_adjustment_ is a real number optionally prefixed by a sign. Numbers prefixed
+with either a *+* or a *-* are relative percentage changes and un-prefixed
+numbers are treated as absolute percentages. If *--max* or *--min* are
+specified, the meanings of a percent of change and a percentage setpoint are
+unaffected. This means that attempting to set 15% brightness when a 10% is set
+will set the brightness to 15%, not 23.5%.
+
+# EXAMPLES
+
+Increase the brightness by 10%:
+
+```
+$ brightness /sys/class/backlight/amdgpu_bl0 +10
+```
+
+Decrease the brightness by 6.25%:
+
+```
+$ brightness /sys/class/backlight/amdgpu_bl0 -6.25
+```
+
+Set the backlight to maximum brightness:
+
+```
+$ brightness /sys/class/backlight/amdgpu_bl0 100
+```
+
+This tool is best paired with _acpid_(8) and used as part of an event handler.
+For example:
+
+```
+#!/bin/sh
+backlight=/sys/class/backlight/amdgpu_bl0
+pct=6.25
+case "$1" in
+video/brightnessup*) brightness "$backlight" "+$pct" ;;
+video/brightnessdown*) brightness "$backlight" "-$pct" ;;
+esac
+```
+
+# SEE ALSO
+
+_sysfs_(5), _acpid_(8)