adi1090x / polybar-themes

A huge collection of polybar themes with different styles, colors and variants.
GNU General Public License v3.0
5.76k stars 412 forks source link

Multi Monitor Support #153

Open HeCodes2Much opened 2 years ago

HeCodes2Much commented 2 years ago

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

EysseW commented 2 years ago

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

HeCodes2Much commented 2 years ago

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

EysseW commented 2 years ago

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

HeCodes2Much commented 2 years ago

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 ?

muhammad-saleh commented 2 years ago

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

HeCodes2Much commented 2 years ago

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