Skip to content

Commit

Permalink
Check for wireless interface type on Linux
Browse files Browse the repository at this point in the history
This should improve detection of wireless devices.
  • Loading branch information
Stealthii committed Apr 17, 2024
1 parent 87eb7ff commit 443de4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/netspeed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ RX_SPEED="#[fg=${THEME[foreground]}]$(readable_format "$RX_DIFF" "$TIME_DIFF")"
TX_SPEED="#[fg=${THEME[foreground]}]$(readable_format "$TX_DIFF" "$TIME_DIFF")"

# Interface icon
if [[ ${INTERFACE} == "en0" ]] || [[ ${INTERFACE:0:1} == "w" ]]; then
if [[ ${INTERFACE} == "en0" ]] || [[ -d /sys/class/net/${INTERFACE}/wireless ]]; then
IFACE_TYPE="wifi"
else
IFACE_TYPE="wired"
Expand Down

0 comments on commit 443de4a

Please sign in to comment.