#!/bin/sh
# SPDX-FileCopyrightText: 2022 Harald Sitter <sitter@kde.org>
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL

# On the KDE Slimbook 3 we'll want to default to wayland instead of x11 as one of the selling points.

set -ex

if [ "$(pkexec dmidecode --string system-manufacturer)" != "SLIMBOOK" ]; then
  echo "I: Not SLIMBOOK"
  exit 0
fi

if [ "$(pkexec dmidecode --string system-product-name)" != "PROX-AMD5" ]; then
  echo "I: Not PROX-AMD5"
  exit 0
fi

echo "I: Enabling wayland by default"
cat << CONF > /var/lib/sddm/state.conf
[Last]
Session=/usr/share/wayland-sessions/plasmawayland.desktop
CONF
