Advertisement
Guest User

Untitled

a guest
Feb 28th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. #! /bin/bash
  2. # MONITOR SCALING HELPER
  3. # by Chris Webster
  4.  
  5. # This is a somewhat hackish, but effective way to
  6. # get my MacBook Retina display to simulate "HiDPI" scaling mode
  7. # on while using 1x1 scaling on my external monitor (iMac in display mode).
  8. # There is slight blurring on MacBook display in dual mode, but it's
  9. # generally worth it...
  10.  
  11. # See how we were called.
  12. case "$1" in
  13. # Dual monitors - second monitor in non-HiDPI, main monitor simulating proper scaling with zoom
  14. dual)
  15. echo Setting up single monitor scaling.
  16. gsettings set org.gnome.desktop.interface scaling-factor 1
  17. gsettings set org.gnome.desktop.interface text-scaling-factor 1
  18. xrandr --output eDP-1 --scale .5x.5
  19. ;;
  20.  
  21. # Single HiDPI monitor
  22. single)
  23. echo Setting up single monitor HiDPI scaling.
  24. # make sure the hackish zooming is turned off (set to 1x1)
  25. xrandr --output eDP-1 --scale 1x1
  26. gsettings set org.gnome.desktop.interface scaling-factor 2
  27. gsettings set org.gnome.desktop.interface text-scaling-factor 2
  28. ;;
  29.  
  30. *)
  31. echo $"Usage: $0 {dual|single}"
  32. ;;
  33. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement