aboutsummaryrefslogtreecommitdiffstats
path: root/dotconfig/polybar/launch.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dotconfig/polybar/launch.sh')
-rwxr-xr-xdotconfig/polybar/launch.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/dotconfig/polybar/launch.sh b/dotconfig/polybar/launch.sh
index f607575..6a70ea0 100755
--- a/dotconfig/polybar/launch.sh
+++ b/dotconfig/polybar/launch.sh
@@ -7,11 +7,11 @@ killall -9 polybar
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
# Set variables
-NETWORK_TYPE="wired" # or `wireless`
+NETWORK_INTERFACE=$(ip route | grep '^default' | awk '{print $5}' | head -n1)
# Launch the bar
echo "---" | tee -a /tmp/mypolybar.log
for m in $(polybar --list-monitors | cut -d":" -f1); do
- MONITOR=$m NETWORK_TYPE=$NETWORK_TYPE polybar main >> /tmp/mypolybar.log 2>&1 & disown
+ MONITOR=$m NETWORK_INTERFACE=$NETWORK_INTERFACE polybar main >> /tmp/mypolybar.log 2>&1 & disown
done
echo "Bar launched..."