diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2021-08-22 19:52:03 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2021-08-22 19:52:03 (EDT) |
commit | 0fb86f66f72b6b3e85f14bb70f258640b1dcdfb3 (patch) | |
tree | fd4e39379cc9b660045d08e1f3fb1713e530b7f5 | |
parent | b7ebac8283285f6abeb3799a842f79dc15727c12 (diff) | |
download | fluxbox-0fb86f66f72b6b3e85f14bb70f258640b1dcdfb3.zip fluxbox-0fb86f66f72b6b3e85f14bb70f258640b1dcdfb3.tar.gz fluxbox-0fb86f66f72b6b3e85f14bb70f258640b1dcdfb3.tar.bz2 |
bin/bright: Keep within range
-rwxr-xr-x | bin/bright | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 } |