From 5c49226514356ac84f3dced67ca48b99b6de6579 Mon Sep 17 00:00:00 2001 From: Mahesh Asolkar Date: Sun, 13 Jun 2021 18:19:49 -0700 Subject: [PATCH] Multiple display setup --- dwl.entourage | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/dwl.entourage b/dwl.entourage index 3104efc..5bbb9ac 100755 --- a/dwl.entourage +++ b/dwl.entourage @@ -2,11 +2,16 @@ echo "Entourage: $XDG_RUNTIME_DIR - $DWL_TAGS_FILE" >> $DWL_LOG_FILE -# Dual screen -wlr-randr --output HDMI-A-1 --on --pos 0,0 --output eDP-1 --on --pos 1680,0 +NUM_DISPS=$(wlr-randr | egrep "^\w+" | wc -l) +echo "Entourage: Configuring ${NUM_DISPS} displays" >> $DWL_LOG_FILE -# Single laptop screen -# wlr-randr --output HDMI-A-1 --off --output eDP-1 --on --pos 0,0 +if [[ $NUM_DISPS > 1 ]]; then + # Dual screen + wlr-randr --output HDMI-A-1 --on --pos 0,0 --output eDP-1 --on --pos 0,1050 +else + # Single laptop screen + wlr-randr --output HDMI-A-1 --off --output eDP-1 --on --pos 0,0 +fi # ---------------------------------------------------------- # Let DWL start