mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-01-30 09:48:11 +01:00
Fix sb-volume decimal integer misinterpreting
Shell script interprets zero-prefixed decimal integer as octal integer so it throws an error when "vol" is equal to "08" or "09" because this values are invalid octal numbers. Now "vol" forced to be decimal.
This commit is contained in:
parent
d4ff2ebaf3
commit
9ed86e9eb5
@ -30,9 +30,9 @@ split() {
|
||||
vol="$(printf "%.0f" "$(split "$vol" ".")")"
|
||||
|
||||
case 1 in
|
||||
$((vol >= 70)) ) icon="🔊" ;;
|
||||
$((vol >= 30)) ) icon="🔉" ;;
|
||||
$((vol >= 1)) ) icon="🔈" ;;
|
||||
$((10#$vol >= 70)) ) icon="🔊" ;;
|
||||
$((10#$vol >= 30)) ) icon="🔉" ;;
|
||||
$((10#$vol >= 1)) ) icon="🔈" ;;
|
||||
* ) echo 🔇 && exit ;;
|
||||
esac
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user