aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEddy Pedroni <epedroni@pm.me>2025-07-29 23:14:33 +0200
committerEddy Pedroni <epedroni@pm.me>2025-07-29 23:14:33 +0200
commitb35ccc26be06d6896e45be9b4cd0d19cda5e2f2b (patch)
treece308b4cb0807a7e0c0d49bfb07b674d4f0cfd28
parent6fa286927847c7ac7b3095bbd4064028c6fb1b44 (diff)
Fix WLAN IPcustom
-rwxr-xr-xdwm-statusbar2
1 files changed, 1 insertions, 1 deletions
diff --git a/dwm-statusbar b/dwm-statusbar
index 2b6e854..06803e3 100755
--- a/dwm-statusbar
+++ b/dwm-statusbar
@@ -239,7 +239,7 @@ print_wlan() {
wlan_status=$(ip addr show dev ${wlan_adapter} | awk 'NR==1 {print $9}')
if [[ "$wlan_status" == "UP" ]]; then
- wlan_ip=$(ip addr show dev ${wlan_adapter} | awk 'NR==3 {print $2}' | sed -r 's/\/.*//')
+ wlan_ip=$(ip -oneline addr show dev wlp1s0 | awk 'match($0, /.+wlp.*inet ([0-9.]+)\/.*/, cap) {print cap[1]}')
let wlan_strength="10 * $(cat /proc/net/wireless | awk 'NR==3 {print substr($3, 1, 2)}') / 7"
if [ $wlan_strength -lt 25 ]; then