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 f33c092dd03ccef7cb6a680eb191498652d03799
parent 473ae7450b0e0cbfc1cf4d88649a3c9dc602839c
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Fri, 25 Sep 2020 14:48:00 +0200

mon, displayselect: add mirror-native mode

Diffstat:
M.local/bin/displayselect | 2+-
M.local/bin/mon | 14++++++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/.local/bin/displayselect b/.local/bin/displayselect @@ -12,6 +12,6 @@ else else ext="$(printf '%s' "$ext_screens" | dmenu -i -p "external:")" fi - mode="$(printf 'ext\next-native\ndual\nmirror' | dmenu -i -p "$ext mode:")" + mode="$(printf 'ext\next-native\ndual\nmirror\nmirror-native' | dmenu -i -p "$ext mode:")" EXT="$ext" mon "$mode" fi diff --git a/.local/bin/mon b/.local/bin/mon @@ -76,6 +76,19 @@ mirror() { --pos "0x0" } +mirror_native() { + tmp="${EXT}" + EXT="${INT}" + INT="${tmp}" + find_res + xrandr --dpi "${DPI_INT}" \ + --fb "${res_int}" \ + --output "${INT}" --primary --mode "${res_int}" --scale 1x1 \ + --output "${EXT}" --mode "${res_ext}" \ + --scale "${res_factor}" \ + --pos "0x0" +} + find_res if [ $# -eq 0 ] || [ -z "$res_ext" ]; then int @@ -86,6 +99,7 @@ else ext-native) ext_native;; dual) dual;; mirror) mirror;; + mirror-native) mirror_native;; *) die "unknown mode $1";; esac fi