summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2021-08-22 20:21:03 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2021-08-22 20:21:03 (EDT)
commit6be0f32a8e3e2563bfd838e5bdef68562d27c3e9 (patch)
tree24c0b7d61c8d737b9f24bd41729bfb3f3567edad
parent8e35c6f415f694c4eab7af77ada67f8a7d9f4f00 (diff)
downloadfluxbox-6be0f32a8e3e2563bfd838e5bdef68562d27c3e9.zip
fluxbox-6be0f32a8e3e2563bfd838e5bdef68562d27c3e9.tar.gz
fluxbox-6be0f32a8e3e2563bfd838e5bdef68562d27c3e9.tar.bz2
bin/bright: Increase bc scale
-rwxr-xr-xbin/bright4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/bright b/bin/bright
index dd8f2df..791e0df 100755
--- a/bin/bright
+++ b/bin/bright
@@ -12,7 +12,7 @@ get_b()
b=$(brightnessctl --class=backlight get) || return 1
printf '%.0f\n' $(printf \
- 'scale = 4;'$(: \
+ 'scale = 20;'$(: \
)'((%d - 1) * sqrt((%d - %d) * (%d - (2 * %d - %d)))) / '$(: \
)'(%d - %d)\n' \
${STEPS} ${MIN} ${b} ${b} ${max} ${MIN} ${max} ${MIN} | bc)
@@ -26,7 +26,7 @@ set_b()
shift 1
brightnessctl --class=backlight set $(printf '%.0f\n' $(printf \
- 'scale = 4;'$(: \
+ 'scale = 20;'$(: \
)'%d + (1 - sqrt(1 - (%d / (%d - 1))^2)) * (%d - %d)\n' \
${MIN} ${b} ${STEPS} ${max} ${MIN} | bc)) || return 1