launch.sh 366 B

1234567891011
  1. #!/usr/bin/env bash
  2. #
  3. pkill polybar
  4. wlan=`/sbin/ifconfig | grep wlp | tail -1 | cut -d ':' -f 1`
  5. eth=`/sbin/ifconfig | grep enx | tail -1 | cut -d ':' -f 1`
  6. [[ -z "$eth" ]] && { eth=`/sbin/ifconfig | grep enp | tail -1 | cut -d ':' -f 1`; }
  7. for m in $(polybar --list-monitors | cut -d":" -f1); do
  8. WLAN=$wlan ETH=$eth MONITOR=$m polybar --reload primary &
  9. done