diff options
-rwxr-xr-x | scripts/slight | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/slight b/scripts/slight index 4c45b80..ee01e54 100755 --- a/scripts/slight +++ b/scripts/slight @@ -26,6 +26,8 @@ run() { if ! ${1} > /dev/null 2>&1; then err "${2}" fi + + [ -n "${3}" ] && echo "${3}" exit 0 } @@ -34,8 +36,7 @@ if ! command -v brightnessctl > /dev/null 2>&1; then fi if [ ${#} != 1 ] && [ ${#} != 2 ]; then - err "${0}: Invalid usage" \ - "Try '${0} -h' for help." + err "${0}: Invalid usage" "Try '${0} -h' for help." fi while getopts "i:d:s:ph" option; do @@ -65,5 +66,4 @@ while getopts "i:d:s:ph" option; do esac done -err "${0}: Invalid usage" \ - "Try '${0} -h' for help." +err "${0}: Invalid usage" "Try '${0} -h' for help." |