#!/bin/bash

BIN=/usr/bin/chromium-real

# Cleanup
if ! pgrep chromium > /dev/null;then
  rm -f $HOME/.config/chromium/Singleton*
fi

# Wayland check
if pgrep labwc > /dev/null 2>&1; then
  WAYLAND="--ozone-platform=wayland"
fi

${BIN} \
  --no-first-run \
  --no-sandbox \
  --password-store=basic \
  --simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT' \
  --start-maximized \
  --test-type \
  --user-data-dir \
  ${WAYLAND} \
   "$@" > /dev/null 2>&1
