Skip to content

Instantly share code, notes, and snippets.

@Swipe650
Last active August 11, 2017 07:04
Show Gist options
  • Save Swipe650/e489c96e071a0b98ea5fa47b4a43cd8c to your computer and use it in GitHub Desktop.
Save Swipe650/e489c96e071a0b98ea5fa47b4a43cd8c to your computer and use it in GitHub Desktop.
toggle resolution between 1680x1050 & 1440x900
#!/bin/bash
high=$(xrandr | grep 'VGA-1 connected 1680x1050' | cut -c 1-25)
low=$(xrandr | grep 'VGA-1 connected 1440x900' | cut -c 1-24)
if [ "$high" == "VGA-1 connected 1680x1050" ]; then
xrandr -s 1440x900 #&& sed -i 's/^//' ~/.conky/conkyrc
fi
if [ "$low" == "VGA-1 connected 1440x900" ]; then
xrandr -s 1680x1050 #&& sed -i 's/^//' ~/.conky/conkyrc
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment