Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added network speedtest #9

Merged
merged 1 commit into from
May 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ I knew I was not the only one who had suffered from these productivity issues as
- `git` for all [Git Automation](https://github.com/hwixley/wix-cli#git-automation) commands.
- Visual Studio Code for the `vsc` code editor command.
- XCode for the `xc` code editor command (only available for Macintosh systems).
- `speedtest` (the Ookla speedtest-cli) for runnning network speed tests. The installation commands for this on MacOS and Debian are in `setup.sh`.

<hr>

Expand Down Expand Up @@ -171,7 +172,8 @@ Please note any command with an argument in angle brackets below (ie. `<branch>`
2. `genqr <url?> <fname?>`: generate a png QR code for the specified URL
3. `wifi`: lists details about available wifi networks on your host machine
4. `wpass`: lists your saved wifi passwords
5. `copy <string?|cmd?>`: copy a string or the output of a shell command (using $(<cmd>) syntax) to your clipboard
5. `speedtest`: run a network speedtest
6. `copy <string?|cmd?>`: copy a string or the output of a shell command (using $(<cmd>) syntax) to your clipboard

<hr>

Expand Down
9 changes: 9 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ warn_text() {
if ! using_zsh; then
info_text "Installing dependencies..."
sudo apt-get install xclip
curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | sudo bash
sudo apt-get install speedtest
fi

if mac; then
info_text "Installing dependencies..."
brew install xclip jq
brew tap teamookla/speedtest
brew install speedtest --force
fi

info_text "Setting up wix-cli..."
Expand Down
5 changes: 5 additions & 0 deletions wix-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ if [ $num_args -eq 0 ]; then
echo "- ip ${ORANGE}: get local and public IP addresses of your computer${RESET}"
echo "- wifi ${ORANGE}: list information on your available wifi networks${RESET}"
echo "- wpass ${ORANGE}: list your saved wifi passwords${RESET}"
echo "- speedtest ${ORANGE}: run a network speedtest${RESET}"
echo "- copy <string?|cmd?> ${ORANGE}: copy a string or the output of a shell command (using \$(<cmd>) syntax) to your clipboard${RESET}"
echo ""
# h1_text "CLI management:"
Expand Down Expand Up @@ -780,6 +781,10 @@ elif [ "$1" = "wpass" ]; then
info_text "Listing saved Wifi passwords:"
sudo grep -r '^psk=' /etc/NetworkManager/system-connections/

elif [ "$1" = "speedtest" ]; then
info_text "Running speedtest..."
speedtest

# QR CODE

elif [ "$1" = "genqr" ]; then
Expand Down