Skip to content

Instantly share code, notes, and snippets.

@fidergo-stephane-gourichon
Last active March 14, 2016 16:41
Show Gist options
  • Save fidergo-stephane-gourichon/15ef032079ebdf8f9fb9 to your computer and use it in GitHub Desktop.
Save fidergo-stephane-gourichon/15ef032079ebdf8f9fb9 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Use at your own risk!
readarray OUTPUTS < <( LC_ALL=C xrandr | sed -n 's/ connected.*$//p' )
MAINSCREEN="${OUTPUTS[0]//[$'\t\r\n ']}"
xrandr --newmode "2560x1440_50.00" 256.09 2560 2728 3008 3456 1440 1441 1444 1482 -HSync +Vsync
xrandr --addmode "${MAINSCREEN}" 2560x1440_50.00
xrandr --output "${MAINSCREEN}" --mode 2560x1440_50.00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment