Skip to content

Instantly share code, notes, and snippets.

@Gaspadlo
Created April 8, 2022 22:45
Show Gist options
  • Save Gaspadlo/01e08d705c4678657bcb296b1cdf5c25 to your computer and use it in GitHub Desktop.
Save Gaspadlo/01e08d705c4678657bcb296b1cdf5c25 to your computer and use it in GitHub Desktop.
#!/bin/sh
# New resolution calculate command example:
# $ cvt 640 400 60
#
# outputs:
# Modeline "640x400_60.00" 20.00 640 664 720 800 400 403 409 417 -hsync +vsync
#
# Add new modes below such as:
xrandr --newmode "640x400_60.00" 20.00 640 664 720 800 400 403 409 417 -hsync +vsync
xrandr --newmode "768x480_60.00" 28.75 768 792 864 960 480 483 489 500 -hsync +vsync
xrandr --newmode "800x500_60.00" 30.75 800 824 896 992 500 503 509 521 -hsync +vsync
xrandr --newmode "928x580_60.00" 42.75 928 968 1056 1184 580 583 589 603 -hsync +vsync
xrandr --newmode "960x600_60.00" 45.25 960 992 1088 1216 600 603 609 624 -hsync +vsync
xrandr --newmode "1152x720_60.00" 66.75 1152 1208 1320 1488 720 723 729 748 -hsync +vsync
xrandr --newmode "1440x900_60.00" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync
xrandr --newmode "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync
xrandr --newmode "1920x1200_60.00" 193.25 1920 2056 2256 2592 1200 1203 1209 1245 -hsync +vsync
for res in "640x400_60.00" "768x480_60.00" "800x500_60.00" "928x580_60.00" "960x600_60.00" "1152x720_60.00" "1440x900_60.00" "1680x1050_60.00" "1920x1200_60.00"; do
echo "adding $res";
xrandr --addmode XWAYLAND0 $res || continue;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment