dotfiles/bin/bar

17 lines
383 B
Plaintext
Raw Normal View History

2023-08-06 13:47:22 +00:00
#!/usr/bin/env bash
set -x
2023-09-18 15:50:08 +00:00
killall polybar
2023-08-06 13:47:22 +00:00
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