Skip to content

Instantly share code, notes, and snippets.

@hmahadik
hmahadik / mixed_dpi_scaling.sh
Last active August 3, 2020 18:08 — forked from jackdpeterson/dock.sh
Ubuntu 18.04 - Mixed DPI with 27" 4K Monitor scaled by 1.5 (HiDPI), and one 24" 1080p monitor scaled by 1.0 (LoDPI)
#!/bin/bash
set -eux
echo "setting 27 inch 4K monitor"
xrandr --output DisplayPort-0 --mode 3840x2160 --scale "1.5x1.5" --rate 60 --primary
echo "setting 24 inch 1080p monitor"
xrandr --output HDMI-A-0 --mode 1920x1080 --scale "2x2" --pos 5760x0
echo "setting global scaling to 2x"