Skip to content

Instantly share code, notes, and snippets.

@hmahadik
Forked from jackdpeterson/dock.sh
Last active August 3, 2020 18:08
Show Gist options
  • Save hmahadik/ef98955f614a879f67b85d6c758a0301 to your computer and use it in GitHub Desktop.
Save hmahadik/ef98955f614a879f67b85d6c758a0301 to your computer and use it in GitHub Desktop.
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"
gsettings set org.gnome.desktop.interface scaling-factor 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment