Created
November 1, 2017 23:24
-
-
Save 0xa/0da7b93431ca5f1a218cf9a256b333e6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# changes the range of display brightness until it's merged into xfpm | |
# --- | |
# 1. save as /usr/bin/xfpm-power-backlight-helper | |
# 2. rename original to /usr/bin/xfpm-power-backlight-helper.orig | |
# 3. enjoy a hopefully more useful brightness setting | |
div=2 | |
args=( "$@" ) | |
if [ "${args[0]}" = "--set-brightness" ] && [ -n "${args[1]}" ]; then | |
args[1]=$((${args[1]} / $div)) | |
fi | |
output=$(/usr/bin/xfpm-power-backlight-helper.orig ${args[@]}) | |
if [ "${args[0]}" = "--get-brightness" ]; then | |
output=$(($output * $div)) | |
fi | |
echo "$output" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment