dotfiles/bin/bar
2023-09-18 17:50:28 +02:00

17 lines
383 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