libsb: cleanup
This commit is contained in:
parent
29b0a33569
commit
e615bc6cb2
1 changed files with 14 additions and 44 deletions
|
@ -23,48 +23,18 @@ export bggray="background='#414868$bgalpha'"
|
||||||
export bgwhite="background='#C0CAF5$bgalpha'"
|
export bgwhite="background='#C0CAF5$bgalpha'"
|
||||||
|
|
||||||
meter_bar() {
|
meter_bar() {
|
||||||
# shellcheck disable=SC2194
|
# shellcheck disable=SC2194
|
||||||
case $1 in
|
case $1 in
|
||||||
9[0-9] | 100)
|
9[0-9] | 100) color="$fgred" bar="▉" ;;
|
||||||
color="$fgred"
|
8[0-9]) color="$fgorange" bar="█" ;;
|
||||||
bar="▉"
|
7[0-9]) color="$fgorange" bar="▇" ;;
|
||||||
;;
|
6[0-9]) color="$fgorange" bar="▆" ;;
|
||||||
8[0-9])
|
5[0-9]) color="$fggreen" bar="▅" ;;
|
||||||
color="$fgorange"
|
4[0-9]) color="$fggreen" bar="▄" ;;
|
||||||
bar="█"
|
3[0-9]) color="$fggreen" bar="▂" ;;
|
||||||
;;
|
2[0-9]) color="$fggreen" bar="▂" ;;
|
||||||
7[0-9])
|
1[0-9]) color="$fggreen" bar="▁" ;;
|
||||||
color="$fgorange"
|
0[0-9] | [0-9]) color="$fggreen" bar=" " ;;
|
||||||
bar="▇"
|
esac
|
||||||
;;
|
printf "%s:%s" "${color}" "${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…
Add table
Add a link
Reference in a new issue