From 206b46917b0cb3844ffca64a8013b76fe102aea9 Mon Sep 17 00:00:00 2001 From: Sam Wright Date: Mon, 8 Apr 2024 23:51:20 +1000 Subject: [PATCH 1/3] Add iPerf Speed Test to dashboards --- commands/dashboards/iperf-speed-test.sh | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 commands/dashboards/iperf-speed-test.sh diff --git a/commands/dashboards/iperf-speed-test.sh b/commands/dashboards/iperf-speed-test.sh new file mode 100644 index 000000000..b5998bcde --- /dev/null +++ b/commands/dashboards/iperf-speed-test.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# Dependency: This script requires `iPerf` to be installed: https://iperf.fr/iperf-download.php +# Install via homebrew: `brew install iperf` + +# Required parameters: +# @raycast.schemaVersion 1 +# @raycast.title iPerf Speed Test +# @raycast.mode inline +# @raycast.refreshTime 1h + +# Optional parameters: +# @raycast.icon 💾 + +# Documentation: +# @raycast.description Runs an iPerf speed test. +# @raycast.author samywamy10 +# @raycast.authorURL https://raycast.com/samywamy10 + +# Add the IP address of your iPerf server here +ip_address='192.168.86.44' + +if ! command -v iperf &> /dev/null; then + echo "iperf command is required ('brew install iperf' or https://iperf.fr/iperf-download.php)."; + exit 1; +fi + +{ iperf3 -c $ip_address | grep 'sender' | tail -n 1 | awk '{print $7 " " $8}' && date +'%-I:%M%p'; } | tr '\n' ' ' | awk '{$3="@ "$3; print $0}' + From bbccfc565606b555ec08363042d63909e3480cbd Mon Sep 17 00:00:00 2001 From: Sam Wright Date: Tue, 9 Apr 2024 09:31:28 +1000 Subject: [PATCH 2/3] Add suggestions from unnamedd Co-authored-by: Thiago Holanda --- commands/dashboards/iperf-speed-test.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/commands/dashboards/iperf-speed-test.sh b/commands/dashboards/iperf-speed-test.sh index b5998bcde..1e5f7d759 100644 --- a/commands/dashboards/iperf-speed-test.sh +++ b/commands/dashboards/iperf-speed-test.sh @@ -5,16 +5,17 @@ # Required parameters: # @raycast.schemaVersion 1 -# @raycast.title iPerf Speed Test +# @raycast.title Speed Test # @raycast.mode inline # @raycast.refreshTime 1h +# @raycast.packageName iPerf # Optional parameters: # @raycast.icon 💾 # Documentation: -# @raycast.description Runs an iPerf speed test. -# @raycast.author samywamy10 +# @raycast.description Runs an iPerf Speed Test. +# @raycast.author Sam Wright # @raycast.authorURL https://raycast.com/samywamy10 # Add the IP address of your iPerf server here From 320dd1eded9426953275aa31295828a85802aa4b Mon Sep 17 00:00:00 2001 From: Sam Wright Date: Tue, 9 Apr 2024 09:32:16 +1000 Subject: [PATCH 3/3] Rename iperf-speed-test.sh to iperf-speed-test.template.sh --- .../{iperf-speed-test.sh => iperf-speed-test.template.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename commands/dashboards/{iperf-speed-test.sh => iperf-speed-test.template.sh} (100%) diff --git a/commands/dashboards/iperf-speed-test.sh b/commands/dashboards/iperf-speed-test.template.sh similarity index 100% rename from commands/dashboards/iperf-speed-test.sh rename to commands/dashboards/iperf-speed-test.template.sh