crissNb / Dynamic-Island-Sketchybar

Dynamic Island on iPhone 14 Pro implementation on Mac using Sketchybar
MIT License
411 stars 22 forks source link

Error with volume and brightness changing #51

Closed SmartGecko44 closed 2 months ago

SmartGecko44 commented 11 months ago

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

SmartGecko44 commented 11 months ago

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.