dotfiles/bin/bar

15 lines
366 B
Plaintext
Raw Normal View History

2023-08-06 13:47:22 +00:00
#!/usr/bin/env bash
set -x
if type "xrandr"; then
2023-08-09 16:21:25 +00:00
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
2023-08-06 13:47:22 +00:00
MONITOR=$m polybar --reload dwm &
done
else
polybar --reload dwm &
fi