summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorPatrick 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)
commit0fb86f66f72b6b3e85f14bb70f258640b1dcdfb3 (patch)
treefd4e39379cc9b660045d08e1f3fb1713e530b7f5 /bin
parentb7ebac8283285f6abeb3799a842f79dc15727c12 (diff)
downloadfluxbox-0fb86f66f72b6b3e85f14bb70f258640b1dcdfb3.zip
fluxbox-0fb86f66f72b6b3e85f14bb70f258640b1dcdfb3.tar.gz
fluxbox-0fb86f66f72b6b3e85f14bb70f258640b1dcdfb3.tar.bz2
bin/bright: Keep within range
Diffstat (limited to 'bin')
-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
}