Skip to content

Commit

Permalink
Use fixed width for network_bandwidth avoid jumps
Browse files Browse the repository at this point in the history
  • Loading branch information
m99coder authored Apr 25, 2024
1 parent c2b1d67 commit 2dcc567
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/network_bandwidth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ main() {
IFS=" " read -ra bandwidth <<<"$(get_bandwidth "$network_name")"

if [[ $show_interface == "true" ]]; then echo -n "[$network_name] "; fi
echo "$(bandwidth_to_unit "${bandwidth[$DOWNLOAD]}") • ↑ $(bandwidth_to_unit "${bandwidth[$UPLOAD]}")"
printf "%6s %-4s • ↑ %6s %-4s\n" $(bandwidth_to_unit "${bandwidth[$DOWNLOAD]}") $(bandwidth_to_unit "${bandwidth[$UPLOAD]}")

((counter = counter - 1))
sleep "$interval_update"
Expand Down

0 comments on commit 2dcc567

Please sign in to comment.