diff options
Diffstat (limited to 'scripts/slight')
| -rwxr-xr-x | scripts/slight | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/scripts/slight b/scripts/slight deleted file mode 100755 index 0289ff4..0000000 --- a/scripts/slight +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -. slib - -help() { -cat << EOF -${0}: Wrapper script to change backlight -options: - -i [Brg] Increase backlight by Brg - -d [Brg] Decrease backlight by Brg - -s [Brg] Set backlight to Brg - -p Show the current backlight - -h Print this message and exit - -NOTE: Script interprets values as percentages -EOF - -exit 0 -} - -check_program "brightnessctl" - -[ ${#} != 1 ] && [ ${#} != 2 ] && invalid_use - -while getopts "i:d:s:ph" option; do - case "${option}" in - i) run --reload-status "brightnessctl set +${OPTARG}%" ;; - - d) run --reload-status "brightnessctl set ${OPTARG}-%" ;; - - s) run --reload-status "brightnessctl set ${OPTARG}%" ;; - - p) - if ! echo $(( ($(brightnessctl g) * 100) / $(brightnessctl m) )); then - err "Failed to get current brightness" - else - exit 0 - fi - ;; - h) help ;; - - *) invalid_use -h ;; - - esac -done - -# Unreachable -invalid_use |
