diff options
| author | Ryan Schanzenbacher <ryan@rschanz.org> | 2026-08-03 01:22:44 -0400 |
|---|---|---|
| committer | Ryan Schanzenbacher <ryan@rschanz.org> | 2026-08-03 01:22:44 -0400 |
| commit | 0c8fa3a2a270747f3dbb54fe8792f3f0aec997e3 (patch) | |
| tree | 6f94ff3aeea2af859c7c166e01a8e73002017893 /users/ryan/modules/simple-bar/simple-bar-source/lib/scripts/netstats.sh | |
Initial commit: combined darwin + guix-linux home-manager flake
Supersedes nix-dotfiles (darwin) and guix-dotfiles' ad-hoc
nix-home-manager flake (linux). See README.md/MIGRATION.md.
Diffstat (limited to 'users/ryan/modules/simple-bar/simple-bar-source/lib/scripts/netstats.sh')
| -rwxr-xr-x | users/ryan/modules/simple-bar/simple-bar-source/lib/scripts/netstats.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/users/ryan/modules/simple-bar/simple-bar-source/lib/scripts/netstats.sh b/users/ryan/modules/simple-bar/simple-bar-source/lib/scripts/netstats.sh new file mode 100755 index 0000000..66447ec --- /dev/null +++ b/users/ryan/modules/simple-bar/simple-bar-source/lib/scripts/netstats.sh | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | # Optimized: Single netstat call with direct output processing | ||
| 4 | netstat -w1 2>&1 | awk 'NR==3 {printf "{ \"download\": %s, \"upload\": %s}", $4, $6; exit}' | ||
| 5 | |||
