diff --git a/.xinitrc b/.xinitrc index 29b4c1b..0e2060c 100644 --- a/.xinitrc +++ b/.xinitrc @@ -17,9 +17,13 @@ xinput set-prop 'pointer:Logitech G903' 'libinput Accel Profile Enabled' 0, 1 ) # display -xrandr \ - --output eDP-1 --pos 0x0 --mode 1920x1080 --rate 60 --primary \ - --output DisplayPort-1-2 --pos 1920x0 --auto \ +( + LAPTOP_SCREEN="$(xrandr --listmonitors | grep eDP | awk '{print $4}')" + + xrandr --output "${LAPTOP_SCREEN}" --mode 1920x1080 --rate 60 --primary +) +xrandr \ + --output DisplayPort-1-2 --pos 1920x0 --auto \ --output DisplayPort-1-1 --pos 3840x0 --auto # startup @@ -27,7 +31,6 @@ xrandr \ picom & redshift & feh --bg-tile "$XDG_CONFIG_HOME/wallpapers/landscape.png" --no-fehbg -nm-applet & dunst & xset dpms 300 15 # dim 5m, lock 5m15s