#!/bin/sh # Since this script runs xrandr to get the connected monitors, it is unnecessary to run xrandr by itself in your xinitrc for monitor in `xrandr | sed -n 's/ connected.*//p'`; do xrandr --output $monitor --set TearFree ${1:-on} done