dotfiles/bin/bar

17 lines
382 B
Bash
Executable File

#!/usr/bin/env bash
set -x
killall polybar
if type "xrandr"; then
for m in $(xrandr --query | grep "connected" |grep "primary" | cut -d" " -f1); do
MONITOR=$m polybar --reload dwm &
done
for m in $(xrandr --query | grep " connected" |grep -v "primary" | cut -d" " -f1); do
MONITOR=$m polybar --reload dwm &
done
else
polybar --reload dwm &
fi