From bfc4ccf15fa4c92fd9b7f2e1b5f9bd06e47fc224 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Sun, 21 Jun 2026 17:43:09 +0900 Subject: modified bin/dmenudisplay --- ar/.local/bin/dmenudisplay | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ar/.local/bin/dmenudisplay b/ar/.local/bin/dmenudisplay index 672ef3a..44c40b8 100755 --- a/ar/.local/bin/dmenudisplay +++ b/ar/.local/bin/dmenudisplay @@ -110,13 +110,15 @@ twoscreen() { # If multi-monitor is selected and there are two screens. ;; above | below) # --above/--below left-align by default; compute positions to right-align. + # Each display keeps its native resolution/DPI (X11 has no real per-monitor + # DPI, so the cursor may catch where the pixel widths differ — accepted). set -- $(res_wh "$primary" "$primary_res"); pw=$1; ph=$2 set -- $(res_wh "$secondary" "$secondary_res"); sw=$1; sh=$2 maxw=$pw; [ "$sw" -gt "$maxw" ] && maxw=$sw px=$((maxw - pw)); sx=$((maxw - sw)) if [ "$direction" = "above" ]; then py=$sh; sy=0; else py=0; sy=$ph; fi - xrandr --output "$primary" --primary --mode "${pw}x${ph}" --pos "${px}x${py}" --scale 1.0x1.0 \ - --output "$secondary" --mode "${sw}x${sh}" --pos "${sx}x${sy}" --scale 1.0x1.0 + xrandr --output "$primary" --primary --mode "${pw}x${ph}" --scale 1.0x1.0 --pos "${px}x${py}" \ + --output "$secondary" --mode "${sw}x${sh}" --scale 1.0x1.0 --pos "${sx}x${sy}" ;; esac fi @@ -140,7 +142,7 @@ morescreen() { # If multi-monitor is selected and there are more than two screen ;; above | below) # Stack vertically (secondary on the chosen side, tertiary opposite) and - # right-align all three to the widest display. + # right-align all three. Each display keeps its native resolution/DPI. set -- $(res_wh "$primary" "$primary_res"); pw=$1; ph=$2 set -- $(res_wh "$secondary" "$secondary_res"); sw=$1; sh=$2 set -- $(res_wh "$tertiary" "$tertiary_res"); tw=$1; th=$2 -- cgit v1.2.3