Ghost1nTh3SSH / dotfiles

bspwm + polybar rices for Debian based systems with a theme selector to change on the fly.
GNU General Public License v3.0
25 stars 2 forks source link

A question of two screens #4

Open Bryan-Herrera-DEV opened 5 months ago

Bryan-Herrera-DEV commented 5 months ago

I need to select in which of my two monitors the polibar configurations are set, but I don't know very well how to achieve my goal, I don't know if you could help me, please, or tell me which is the configuration file that I should modify.

Ghost1nTh3SSH commented 5 months ago

Unfortunately I only have 1 monitor, so haven't tested.

However, by searching for similar issue I was able to find this: https://github.com/polybar/polybar/issues/763#issuecomment-331604987 https://github.com/polybar/polybar/issues/763#issuecomment-392960721

1st part) This code I believe should go inside the Theme.sh files in each theme folder: As an example: ghost-rice/bspwm/themes/lain/Theme.sh

# Launch the bar
launch_bars() {
        for m in $(polybar --list-monitors | cut -d":" -f1); do
            MONITOR=$m polybar --reload lain-bar -c ${HOME}/.config/bspwm/themes/lain/config.ini &
        MONITOR=$m polybar --reload lain-bar2 -c ${HOME}/.config/bspwm/themes/lain/config.ini &
        MONITOR=$m polybar --reload lain-bar3 -c ${HOME}/.config/bspwm/themes/lain/config.ini &
        done
}

2nd part) The polybar config it's on a file named "config.ini" in each theme folder. As an example: ghost-rice/bspwm/themes/lain/config.ini

There you should add this:

[bar/lain-bar]
monitor = ${env:MONITOR:}
[..]

[bar/lain-bar2]
monitor = ${env:MONITOR:}
[..]

[bar/lain-bar3]
monitor = ${env:MONITOR:}
[..]

As mentioned, unfortunately I cannot test it myself and this a bit of my guessing on how to approach the issue.

Please, try it when you can and let me know if it helped :)