18 lines
551 B
Bash
Executable File
18 lines
551 B
Bash
Executable File
#!/bin/bash
|
|
|
|
declare -A screen_map
|
|
|
|
screen_map[DP-2]=0
|
|
screen_map[DP-0]=1
|
|
|
|
if type "xrandr"; then
|
|
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
|
|
id=${screen_map[$m]}
|
|
MONITOR=$m MONITOR_ID="${screen_map[$m]}" polybar --config=~/.config/polybar/config-$id-top.ini & #TOP
|
|
MONITOR=$m MONITOR_ID="${screen_map[$m]}" polybar --config=~/.config/polybar/config-$id-bottom.ini & #BOTTOM
|
|
done
|
|
fi
|
|
|
|
# Spawn trayer from here as Z clipping issue can be fixed from restarting trayer after polybar
|
|
/usr/local/bin/trayer-restart
|