polybar-config
polybar-config copied to clipboard
Multi Monitor Support
trafficstars
below is the code to make these scripts have multi monitor support then just add monitor = ${env:MONITOR} to the config.ini for the bar
if type "xrandr" > /dev/null; then
while read F1 F2 _; do
if [ "$F2" = 'connected' ]; then
MONITOR=$F1 polybar --reload main -c ~/.config/polybar/config.ini &
fi
done <<< $( xrandr )
else
polybar --reload main -c ~/.config/polybar/config.ini &
fi
PS: most systems come with xrandr anyways but if not then add that in the list as a depends :)
Hi, thanks for snippet. Can you create PR for it? You can contribute with it. Thanks!
sorry for the slow response but yes I will do so when I am next on the PC I totaly forgot I made this issue sorry for the wait