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

Multi Monitor Support

Open HeCodes2Much opened this issue 2 years ago • 6 comments

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 :)

HeCodes2Much avatar Dec 11 '21 17:12 HeCodes2Much

Where do I put teh script? I have been struggling trying to get polybar themes to work on multiple displays.

EysseW avatar Feb 12 '22 23:02 EysseW

Where do I put teh script? I have been struggling trying to get polybar themes to work on multiple displays.

there should already be a script just need to edit it with the code above I don't think upsteam is working on the themes anymore I may fork them later

HeCodes2Much avatar Feb 15 '22 07:02 HeCodes2Much

I edited the launch.sh and pasted the code between the launch and the ilfs. It didn't work the.

EysseW avatar Feb 15 '22 09:02 EysseW

I edited the launch.sh and pasted the code between the launch and the ilfs. It didn't work the.

did you also change the MONITOR= inside the polybar bar too ?

HeCodes2Much avatar Feb 15 '22 09:02 HeCodes2Much

@The-Repo-Club monitor = ${env:MONITOR} what does env means here? shouldn't this be just ${MONITOR}

muhammad-saleh avatar Sep 01 '22 12:09 muhammad-saleh

not all programs can read env values so that is why it's there for polybar

HeCodes2Much avatar Sep 01 '22 16:09 HeCodes2Much