polybar-config icon indicating copy to clipboard operation
polybar-config copied to clipboard

Multi Monitor Support

Open CreativeCodeCat opened this issue 3 years ago • 2 comments
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 :)

CreativeCodeCat avatar Dec 11 '21 17:12 CreativeCodeCat

Hi, thanks for snippet. Can you create PR for it? You can contribute with it. Thanks!

raven2cz avatar Dec 14 '21 06:12 raven2cz

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

CreativeCodeCat avatar Jul 12 '22 06:07 CreativeCodeCat