Skip to content

Instantly share code, notes, and snippets.

@sarnau
Created March 1, 2025 01:27
Show Gist options
  • Save sarnau/df45ea9ba4727440871e28aa69c8495f to your computer and use it in GitHub Desktop.
Save sarnau/df45ea9ba4727440871e28aa69c8495f to your computer and use it in GitHub Desktop.
SwiftBar plugin to show the current actual Ethernet connection speed. I had issues with it falling back to 100MBit, instead of 1GBit
#!/usr/bin/env bash
# <xbar.title>Network Media</xbar.title>
# <xbar.version>v1.0.0</xbar.version>
# <xbar.author>Markus Fritze</xbar.author>
# <xbar.author.github>sarnau</xbar.author.github>
# <xbar.desc>Displays the used media for an Ethernet connection.</xbar.desc>
# <xbar.dependencies>ifconfig</xbar.dependencies>
MEDIA=$(ifconfig -a | grep -o -i "\\d\+g\?base\-T")
echo "Ethernet $MEDIA"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment