dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit a55a96aa7ce0c1fddf95629898acc26b967d1269
parent 067eefd65ea7fa41ed1a73ea689d770c09ba84ab
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Fri, 25 Sep 2020 13:23:56 +0200

mon: fix 'dual' mode

Diffstat:
M.local/bin/mon | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/.local/bin/mon b/.local/bin/mon @@ -2,7 +2,6 @@ int=eDP-1 int_dpi=315 - ext=HDMI-1 res_from_xrandr() { @@ -51,10 +50,11 @@ ext() { dual() { xrandr --dpi "$int_dpi" \ --fb "$(printf '%d*2\n' "$res_int_x" | bc)x${res_int_y}" \ - --output "$int" --mode "${res_int}" --scale 1x1 \ + --output "$int" --primary --mode "${res_int}" --scale 1x1 \ --output "$ext" --mode "${res_ext}" \ + --pos "${res_int_x}x0" \ --scale "${res_factor}x${res_factor}" \ - --right-of "$int" + --panning "${res_int}+${res_int_x}+0" } mirror() { @@ -65,6 +65,9 @@ mirror() { --same-as "$int" --scale "${res_factor}x${res_factor}" } +if [ $# -gt 1 ]; then + ext="$2" +fi find_res if [ $# -eq 0 ] || [ -z "$res_ext" ]; then int