gh0stzk / dotfiles

BSPWM environment with 18 themes. With a theme selector to change on the fly.
GNU General Public License v3.0
3.03k stars 228 forks source link

Configure two monitors #314

Closed PapuchoX2X closed 2 months ago

PapuchoX2X commented 2 months ago

I paste the code in ~/.config/bspwm/bspwmrc in line 26 '''

change these values according to your system

# you can use `xrandr -q` to get the names of monitors
INTERNAL_MONITOR="eDP"
EXTERNAL_MONITOR="HDMI-A-0"
if [[ $(xrandr -q | grep "${EXTERNAL_MONITOR} connected") ]]; then
    bspc monitor "$EXTERNAL_MONITOR" -d '' '' '' ''
    bspc monitor "$INTERNAL_MONITOR" -d '' '' '' ''
    bspc wm -O "$EXTERNAL_MONITOR" "$INTERNAL_MONITOR"
else
    bspc monitor "$INTERNAL_MONITOR" -d '' '' '' '' '' '' '' ''
fi

''' and change de values of INTERNAL_MONITOR and EXTERNAL_MONITOR and nothing happens. can you help me please?

guidamiao commented 2 months ago

I don't know if this helps you, but I did it this way... and then with xrandr I defined the positions of the monitors, however, every time I turn it on I start autorandr to get the configuration I made with the correct guidelines.

image

change these values according to your system

# you can use `xrandr -q` to get the names of monitors
INTERNAL_MONITOR="HDMI-0"
EXTERNAL_MONITOR="DP-1"
if [[ $(xrandr -q | grep "${EXTERNAL_MONITOR} connected") ]]; then
    bspc monitor "$EXTERNAL_MONITOR" -d '1' '2' '3' '4'
    bspc monitor "$INTERNAL_MONITOR" -d '5' '6' '7' '8'
    bspc wm -O "$EXTERNAL_MONITOR" "$INTERNAL_MONITOR"
else
    bspc monitor "$INTERNAL_MONITOR" -d '1' '2' '3' '4' '5' '6' '7' '8'
fi
vmxt commented 2 months ago

I don't know if this helps you, but I did it this way... and then with xrandr I defined the positions of the monitors, however, every time I turn it on I start autorandr to get the configuration I made with the correct guidelines.

image

change these values according to your system

# you can use `xrandr -q` to get the names of monitors
INTERNAL_MONITOR="HDMI-0"
EXTERNAL_MONITOR="DP-1"
if [[ $(xrandr -q | grep "${EXTERNAL_MONITOR} connected") ]]; then
  bspc monitor "$EXTERNAL_MONITOR" -d '1' '2' '3' '4'
  bspc monitor "$INTERNAL_MONITOR" -d '5' '6' '7' '8'
  bspc wm -O "$EXTERNAL_MONITOR" "$INTERNAL_MONITOR"
else
  bspc monitor "$INTERNAL_MONITOR" -d '1' '2' '3' '4' '5' '6' '7' '8'
fi

[+1] this one works on my end