Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A question of two screens #4

Open
Bryan-Herrera-DEV opened this issue Jan 30, 2024 · 1 comment
Open

A question of two screens #4

Bryan-Herrera-DEV opened this issue Jan 30, 2024 · 1 comment

Comments

@Bryan-Herrera-DEV
Copy link

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
Copy link
Owner

Ghost1nTh3SSH commented Feb 7, 2024

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

However, by searching for similar issue I was able to find this:
polybar/polybar#763 (comment)
polybar/polybar#763 (comment)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants