#!/bin/bash

#reso=$(xrandr | grep -m1 "*+" | awk '{ print $1 }' | cut -c -4)
#reso=$(fbset -s | grep geometry | awk '{print $2}')
#if [ "$reso" -ge 3840 ]; then
#    export QT_AUTO_SCREEN_SET_FACTOR=0
#    export QT_SCALE_FACTOR=2
#    export QT_FONT_DPI=192
#else
#    if [ "$reso" -ge 2048 ]; then
#	export QT_AUTO_SCREEN_SET_FACTOR=0
#	export QT_SCALE_FACTOR=1.3
#	export QT_FONT_DPI=144
#    fi
#fi
#cat <<'EOF' > /etc/skel/.config/kwalletrc
#[Wallet]
#Enabled=false
#
#EOF

# Force Plasma themeing
export QT_PLATFORM_PLUGIN=kde
export KDE_FULL_SESSION=TRUE
export QT_QPA_PLATFORMTHEME=Breeze

/usr/bin/_tuxedo.calamares -d 8 "$@"
dpkg -i /usr/share/tuxedo/packages/lvm2*.deb
pvscan --cache -aay


if [ -d /tmp/calamares-root-* ]; then
    umount -R /tmp/calamares-root*
    rmdir /tmp/calamares-root*
fi
