aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dot_config/sway/executable_brightness-osd.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dot_config/sway/executable_brightness-osd.sh')
-rw-r--r--dot_config/sway/executable_brightness-osd.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/dot_config/sway/executable_brightness-osd.sh b/dot_config/sway/executable_brightness-osd.sh
index 74d6baa..cc802ad 100644
--- a/dot_config/sway/executable_brightness-osd.sh
+++ b/dot_config/sway/executable_brightness-osd.sh
@@ -6,11 +6,14 @@ set -eu
fifo=${XDG_RUNTIME_DIR:-/tmp}/wob.sock
case "${1:-}" in
- up) brightnessctl set +5% >/dev/null ;;
- down) brightnessctl set 5%- >/dev/null ;;
- *) echo "usage: $0 up|down" >&2; exit 2 ;;
+ up) brightnessctl set +5% >/dev/null ;;
+ down) brightnessctl set 5%- >/dev/null ;;
+ *)
+ echo "usage: $0 up|down" >&2
+ exit 2
+ ;;
esac
cur=$(brightnessctl g)
max=$(brightnessctl m)
-printf '%d\n' "$(( cur * 100 / max ))" >"$fifo"
+printf '%d\n' "$((cur * 100 / max))" >"$fifo"