2023-02-21 12:15:57 -08:00
|
|
|
|
#!/usr/bin/env zsh
|
|
|
|
|
|
|
|
|
|
let volume="$(pamixer --get-volume)"
|
|
|
|
|
local icon
|
|
|
|
|
if [[ "$(pamixer --get-mute)" = "true" ]]; then
|
2023-05-04 15:04:51 -07:00
|
|
|
|
icon=''
|
2023-02-21 12:15:57 -08:00
|
|
|
|
elif ((${volume} > 50)); then
|
2023-05-06 14:31:12 -07:00
|
|
|
|
icon=''
|
2023-02-21 12:15:57 -08:00
|
|
|
|
elif ((${volume} > 0)); then
|
2023-05-04 15:04:51 -07:00
|
|
|
|
icon=''
|
2023-02-21 12:15:57 -08:00
|
|
|
|
else
|
2023-05-06 14:31:12 -07:00
|
|
|
|
icon='?'
|
2023-02-21 12:15:57 -08:00
|
|
|
|
fi
|
|
|
|
|
printf '%s%3d%%\n' "${icon}" "${volume}"
|