crissNb/Dynamic-Island-Sketchybar

Error with volume and brightness changing

Opened this issue · 1 comments

I am on a MBA 15" 2023 running MacOS Sonoma. When changing the volume or the brightness, the notch doesn't display the volume bar nor the brightness bar.
Changing the volume throws this error in the terminal:

volume 38 /Users/me/.config/dynamic-island-sketchybar/process.sh: line 14: 91516 Terminated: 15 bash "$ISLAND_DIR/volume/volume_island.sh" "$OVERRIDE|$ARGS" /Users/me/.config/dynamic-island-sketchybar/scripts/islands/volume/volume_island.sh: line 57: printf: 46.36000000000000000000: invalid number

Changing the brightness throws this error:

brightness 25 /Users/me/.config/dynamic-island-sketchybar/process.sh: line 14: 92635 Terminated: 15 bash "$ISLAND_DIR/brightness/brightness_island.sh" "$OVERRIDE|$ARGS" /Users/me/.config/dynamic-island-sketchybar/scripts/islands/brightness/brightness_island.sh: line 53: printf: 60.00000000000000000000: invalid number

I rewrote the code at line 57 to use awk instead (barWidth=$(echo "$barWidth" | awk '{print int($1+0.5)}')), but the bar only fills about halfway at a volume of 100.