This commit is contained in:
Marco Thomas
2020-12-05 02:11:28 +01:00
parent e086203277
commit f7029fd3d9
6 changed files with 38 additions and 24 deletions

17
files/scripts/polybar.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
killall -q polybar
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
if type "xrandr"; then
for mon in $(xrandr --query | grep " connected" | cut -d" " -f1); do
if [ $mon = "eDP" ]; then
MONITOR=$mon polybar --reload laptop &
elif [ $mon = "DP-3" ]; then
MONITOR="DP-3" polybar --reload desktop &
MONITOR="DP-1" polybar --reload desktop_second &
fi
done
else
echo "No Bars loaded."
fi