bspwm
bspwm copied to clipboard
`bspc config remove_unplugged_monitors true` resets the monitor order
If bspc wm -O <monitors>
is run before bspc config remove_unplugged_monitors true
it has no effect.
Since this isn't documented in the manual I'm assuming it's a bug.
Config where bspc wm -O <monitors>
doesn't work.
#!/bin/sh
# start sxhkd
killall -q sxhkd
sxhkd &
# monitors
displayport="$(xrandr --query | grep -o "DisplayPort-. connected" | cut -d " " -f 1)"
if [ -n "$displayport" ]; then
bspc wm -O eDP # <=====
bspc monitor eDP -d 1 2 3 4 5
bspc monitor "$displayport" -d 6 7 8
else
bspc monitor -d 1 2 3 4 5
fi
# config
bspc config border_width 3
bspc config borderless_monocle true
bspc config directional_focus_tightness low
bspc config gapless_monocle true
bspc config remove_disabled_monitors true
bspc config remove_unplugged_monitors true # <=====
bspc config single_monocle true
bspc config split_ratio 0.5
bspc config window_gap 0
# start polybar(s)
"$XDG_CONFIG_HOME/bspwm/polybar.sh" &
Config where it does work.
#!/bin/sh
# start sxhkd
killall -q sxhkd
sxhkd &
# monitors
displayport="$(xrandr --query | grep -o "DisplayPort-. connected" | cut -d " " -f 1)"
if [ -n "$displayport" ]; then
bspc monitor eDP -d 1 2 3 4 5
bspc monitor "$displayport" -d 6 7 8
else
bspc monitor -d 1 2 3 4 5
fi
# config
bspc config border_width 3
bspc config borderless_monocle true
bspc config directional_focus_tightness low
bspc config gapless_monocle false
bspc config remove_disabled_monitors true
bspc config remove_unplugged_monitors true # <=====
bspc wm -O eDP # <=====
bspc config single_monocle true
bspc config split_ratio 0.5
bspc config window_gap 0
# start polybar(s)
"$XDG_CONFIG_HOME/bspwm/polybar.sh" &
this seems to work fine here:
$ bspc query -M --names
DVI-D-0
HDMI-0
$ bspc wm -O HDMI-0
$ bspc query -M --names
HDMI-0
DVI-D-0
$ bspc config remove_unplugged_monitors
false
what is the behavior that you are expecting and not seeing?
bspc config remove_unplugged_monitors true
resets the monitor order.
$ bspc query -M --names
eDP
DisplayPort-1
$ bspc config remove_unplugged_monitors true
$ bspc query -M --names
DisplayPort-1
eDP
oh. maybe change the issue description?
seems to me that update_monitors() resets the monitor order. so any command that will call it would result in the same issue. eg setting any SET_MON_BOOL command or bspc wm -r
would also reset the monitor order.
As a side note, how does your bspc query
returns xrandr
values? Mine only shows something like 0x000...
As a side note, how does your
bspc query
returnsxrandr
values? Mine only shows something like 0x000...
Add the --names
flag
Man I don't know if it was after using the xrandr
command on bspwmrc but now it does show the monitor names where before was just 0x000000...