Dell Linux Dock display switcher script

This might be helpful for someone. A quick script I made for changing output modes on my Dell laptop. There are different configurations.
laptop: laptop screen only
vga: vga output + laptop screen
mix: hdmi + vga output, laptop screen off
dock: dell dock display setup

#!/bin/bash
LAPTOP='LVDS-1'
DOCKLEFT='DP-2'
DOCKRIGHT='DP-1'

VGA='VGA-1'
HDMI='HDMI-1'

case $1 in
  laptop)
    xrandr --output $VGA       --off
    xrandr --output $DOCKLEFT  --off
    xrandr --output $DOCKRIGHT --off
    xrandr --output $LAPTOP    --mode 1920x1080
    sleep 5
    xrandr --output $LAPTOP    --mode 1920x1080
    sleep 5
    xrandr --output $LAPTOP    --mode 1920x1080
  ;;
  vga)
    xrandr --output $LAPTOP --mode 1920x1080
    xrandr --output $VGA    --mode 1920x1080 --right-of $LAPTOP
  ;;
  mix)
    xrandr --output $LAPTOP    --off
    xrandr --output $HDMI      --mode 1920x1080
    xrandr --output $VGA       --mode 1920x1080 --right-of $HDMI
  ;;
  dock)
    xrandr --output $LAPTOP    --off
    xrandr --output $DOCKLEFT  --mode 1920x1080
    xrandr --output $DOCKRIGHT --mode 1920x1080 --right-of $DOCKLEFT
  ;;
  *)
    echo "laptop/vga/dock.."
    exit 1
  ;;
esac

Note: switching back to laptop is buggy on my system, if anyone has help, let me know