8000 Dual Monitor setup not playing nice with polybar. · Issue #8 · gh0stzk/dotfiles · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Dual Monitor setup not playing nice with polybar. #8

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. 8000

Already on GitHub? Sign in to your account

Closed
hexlocation opened this issue Oct 28, 2022 · 4 comments
Closed

Dual Monitor setup not playing nice with polybar. #8

hexlocation opened this issue Oct 28, 2022 · 4 comments

Comments

@hexlocation
Copy link

Hey, tried your rice. When using any rice, polybar only shows up on one monitor. Any fix for this? Love your work btw

@gh0stzk
Copy link
Owner
gh0stzk commented Oct 28, 2022

Yes is possible, unfortunately I only have one monitor and what I do is created and tested for me on my hardware. But these links may help u.

https://github.com/polybar/polybar/wiki/Configuration#bar-settings
polybar/polybar#763

@hexlocation
Copy link
Author

Cool! I made an launch_poly script in the scripts folder, containing this:
polydir="$HOME/.config/bspwm/rices/emilia/polybar" if type "xrandr"; then for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do MONITOR=$m polybar --reload emi-bar -c ${polydir}/config.ini & done else polybar --reload emi-bar -c ${polydir}/config.ini & fi

Then i did chmod +x launch_poly.sh and changed
`function SetGirlFriendRice() {

case $RICETHEME in

	emilia)
	
	  SetBspwmConf 0 60 5 "#202132" "#202132" "#202132" "#070219" 5 5
	  		  
	  killeww
	  launch polybar -q emi-bar -c ${polydir}/config.ini <-------
	  launch dunst -config ${bspdir}/dunstrc-dark &
	  
	  ;;`

to
`function SetGirlFriendRice() {

    case $RICETHEME in

            emilia)

              SetBspwmConf 0 60 5 "#202132" "#202132" "#202132" "#070219" 5 5

              killeww
              launch launch_poly.sh
              launch dunst -config ${bspdir}/dunstrc-dark &

              ;;

`,
Only issue is that the bar on both monitors only show the workspaces for my primary monitor. Doesn't matter tho, workspace 8 and 9 still work on my second monitor.

@gh0stzk
Copy link
Owner
gh0stzk commented Oct 29, 2022

Ok there are some thing you need to change. in bspwmrc there is this code:

workspaces() { name=1 for monitor in bspc query -M; do bspc monitor ${monitor} -n "$name" -d '1' '2' '3' '4' '5' '6' let name++ done }

You need to adapt it for 2 monitors or just delete and do:

`bspc monitor LVDS1 -d 1 2 3 4 5

bspc monitor VGA1 -d 6 7 8 9`

then in polybar.ini create another bar for the second monitor;

`[bar/top]
bottom = false
monitor = LVDS1

modules-left = bspwm mpd
modules-right = keyboard battery backlight temperature volume datetime powermenu

[bar/top_external]
bottom = false
monitor = VGA1

modules-left = bspwm mpd
modules-right = keyboard volume datetime powermenu`

this links have some scripts may help you:
https://protesilaos.com/codelog/multihead-bspwm-polybar/
https://miikanissi.com/blog/hotplug-dual-monitor-setup-bspwm/
https://www.reddit.com/r/bspwm/comments/iv6d3r/how_to_add_dual_polybars_on_two_monitors/

@kvlx-alt
Copy link

Ok there are some thing you need to change. in bspwmrc there is this code:

workspaces() { name=1 for monitor in bspc query -M; do bspc monitor ${monitor} -n "$name" -d '1' '2' '3' '4' '5' '6' let name++ done }

You need to adapt it for 2 monitors or just delete and do:

`bspc monitor LVDS1 -d 1 2 3 4 5

bspc monitor VGA1 -d 6 7 8 9`

then in polybar.ini create another bar for the second monitor;

`[bar/top] bottom = false monitor = LVDS1

modules-left = bspwm mpd modules-right = keyboard battery backlight temperature volume datetime powermenu

[bar/top_external] bottom = false monitor = VGA1

modules-left = bspwm mpd modules-right = keyboard volume datetime powermenu`

this links have some scripts may help you: https://protesilaos.com/codelog/multihead-bspwm-polybar/ https://miikanissi.com/blog/hotplug-dual-monitor-setup-bspwm/ https://www.reddit.com/r/bspwm/comments/iv6d3r/how_to_add_dual_polybars_on_two_monitors/

in Z0mbi3 the polybar.ini is polybar_tray.ini?

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

3 participants
0