diff options
author | Tomasz Kramkowski <tomasz@kramkow.ski> | 2023-05-17 17:57:03 +0100 |
---|---|---|
committer | Tomasz Kramkowski <tomasz@kramkow.ski> | 2023-05-17 18:08:55 +0100 |
commit | 907476d664f87c837193c8b85daa71ef96d75de7 (patch) | |
tree | 73c8c4c4afbf85d6b88f8e904b8e89ff4c6b9e62 /brightness.1.scd | |
parent | eaa48d11beda1b01350c7268b5a7b1db16b7365f (diff) | |
download | brightness-master.tar.gz brightness-master.tar.xz brightness-master.zip |
Diffstat (limited to 'brightness.1.scd')
-rw-r--r-- | brightness.1.scd | 71 |
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) |