summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/bright7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/bright b/bin/bright
index 7aa0801..87126e1 100755
--- a/bin/bright
+++ b/bin/bright
@@ -54,7 +54,12 @@ main()
esac
b=$(get_b) || return 1
- set_b $((${b} ${dir} 1)) || return 1
+ : $((b += 1))
+ : $((b ${dir}= 1))
+ [ ${b} -gt 8 ] && b=8
+ [ ${b} -lt 1 ] && b=1
+ : $((b -= 1))
+ set_b ${b} || return 1
return 0
}