diff options
author | listout <listout@protonmail.com> | 2022-01-30 21:41:10 +0530 |
---|---|---|
committer | listout <listout@protonmail.com> | 2022-01-30 21:41:10 +0530 |
commit | 3e37a565f516f57b56249f5e0051978d4c2173af (patch) | |
tree | cfd8ccbeec42317e8dfbb7556f48f5c01cfc0d50 /.config | |
parent | c3fc1b7e9cefc27ff18e7cf7861667d9606292f3 (diff) |
Get the wifi interface name from environment variable, from launch script
Diffstat (limited to '.config')
-rw-r--r-- | .config/polybar/config | 2 | ||||
-rwxr-xr-x | .config/polybar/launch.sh | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/.config/polybar/config b/.config/polybar/config index 2b154d5..5153f47 100644 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -166,7 +166,7 @@ label-empty-background = #1a1a24 [module/network] type=internal/network -interface=wlp3s0 +interface=${env:DEFAULT_NETWORK_INTERFACE:wlan0} interval=3.0 label-connected=%local_ip% label-disconnected="" diff --git a/.config/polybar/launch.sh b/.config/polybar/launch.sh index 791b22d..9190a54 100755 --- a/.config/polybar/launch.sh +++ b/.config/polybar/launch.sh @@ -5,6 +5,7 @@ for i in /sys/class/hwmon/hwmon*/temp*_input; do export HWMON_PATH="$i" fi done +export DEFAULT_NETWORK_INTERFACE=$(ip route | grep '^default' | awk '{print $5}' | head -n1) killall -q polybar echo "---" | tee -a /tmp/polybar1.log polybar mybar 2>&1 | tee -a /tmp/polybar1.log & disown |