libsb: cleanup
This commit is contained in:
parent
29b0a33569
commit
e615bc6cb2
|
@ -23,48 +23,18 @@ export bggray="background='#414868$bgalpha'"
|
|||
export bgwhite="background='#C0CAF5$bgalpha'"
|
||||
|
||||
meter_bar() {
|
||||
# shellcheck disable=SC2194
|
||||
case $1 in
|
||||
9[0-9] | 100)
|
||||
color="$fgred"
|
||||
bar="▉"
|
||||
;;
|
||||
8[0-9])
|
||||
color="$fgorange"
|
||||
bar="█"
|
||||
;;
|
||||
7[0-9])
|
||||
color="$fgorange"
|
||||
bar="▇"
|
||||
;;
|
||||
6[0-9])
|
||||
color="$fgorange"
|
||||
bar="▆"
|
||||
;;
|
||||
5[0-9])
|
||||
color="$fggreen"
|
||||
bar="▅"
|
||||
;;
|
||||
4[0-9])
|
||||
color="$fggreen"
|
||||
bar="▄"
|
||||
;;
|
||||
3[0-9])
|
||||
color="$fggreen"
|
||||
bar="▂"
|
||||
;;
|
||||
2[0-9])
|
||||
color="$fggreen"
|
||||
bar="▂"
|
||||
;;
|
||||
1[0-9])
|
||||
color="$fggreen"
|
||||
bar="▁"
|
||||
;;
|
||||
0[0-9] | [0-9])
|
||||
color="$fggreen"
|
||||
bar=" "
|
||||
;;
|
||||
esac
|
||||
printf "%s:%s" "${color}" "${bar}"
|
||||
# shellcheck disable=SC2194
|
||||
case $1 in
|
||||
9[0-9] | 100) color="$fgred" bar="▉" ;;
|
||||
8[0-9]) color="$fgorange" bar="█" ;;
|
||||
7[0-9]) color="$fgorange" bar="▇" ;;
|
||||
6[0-9]) color="$fgorange" bar="▆" ;;
|
||||
5[0-9]) color="$fggreen" bar="▅" ;;
|
||||
4[0-9]) color="$fggreen" bar="▄" ;;
|
||||
3[0-9]) color="$fggreen" bar="▂" ;;
|
||||
2[0-9]) color="$fggreen" bar="▂" ;;
|
||||
1[0-9]) color="$fggreen" bar="▁" ;;
|
||||
0[0-9] | [0-9]) color="$fggreen" bar=" " ;;
|
||||
esac
|
||||
printf "%s:%s" "${color}" "${bar}"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue