preview_window_location() {
  # determines whether fzf preview window should be at the top or the right,
  # depending on how wide the terminal is.
  # tty size
  cols="$(stty size </dev/tty | awk '{ print $2 }' || echo "80")"
  if [ "${cols}" -gt 150 ]; then
    echo "right"
  else
    echo "up"
  fi
}
