spacepaste

  1.  
  2. data="$(xrandr -q | grep connect )"
  3. last=''
  4. echo "$data" | grep ' connected ' | while read output rest; do
  5. xrandr --output $output ${last:+--right-of} $last --preferred
  6. last=$output
  7. done
  8.