Skip to content

Commit

Permalink
Merge pull request #263 from m99coder/patch-1
Browse files Browse the repository at this point in the history
Use fixed width for network bandwidth to avoid jumps
  • Loading branch information
ethancedwards8 authored Sep 5, 2024
2 parents 8f1a959 + 2dcc567 commit 43997c4
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 43997c4

Please sign in to comment.