aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/bar
blob: 39267a6445a299f4c1ccb3c0253fa28a09c2f371 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

STEPS=10

repeat() {
	printf %${2}s | sed -e "s/ /$1/g"
}


usage=$(expr $1 \* $STEPS / 100)

if [ "$usage" -gt "$STEPS" ]; then
	usage=$STEPS
fi

printf ""
repeat "󰝤" "$usage"
repeat "󰧟" "$(expr $STEPS - $usage)"
printf "\n"