#!/bin/bash
if [ -d /home/oem/.config/xfce4/ ]; then
    rm -r /home/oem/.config/xfce4/
fi

pkill xfce4-panel
pkill xfce4-screensav

xfconf-query -c xfce4-keyboard-shortcuts -p "/commands/custom/<Primary><Alt>t" -r
xfconf-query -c xfce4-desktop -p /desktop-icons/style -s 0

xfconf-query -c thunar-volman -p /autobrowse/enabled -s false
xfconf-query -c thunar-volman -p /automount-drives/enabled -s false
xfconf-query -c thunar-volman -p /automount-media/enabled -s false
xfconf-query -c thunar-volman -p /autoopen/enabled -s false

xfconf-query -c xfce4-session -p /general/LockCommand -n -t string -s ""
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/blank-on-ac -n -t int -s 1800
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/blank-on-battery -n -t int -s 1800

xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/dpms-enabled -n -t bool -s false
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/dpms-on-ac-off -n -t int -s 1800
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/dpms-on-ac-sleep -n -t int -s 1800
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/dpms-on-battery-off -n -t int -s 1800
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/dpms-on-battery-sleep -n -t int -s 1800

xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/inactivity-sleep-mode-on-ac -n -t int -s 1800
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/inactivity-sleep-mode-on-battery -n -t int -s 1800

xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/lock-screen-suspend-hibernate -n -t bool -s false
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/button-lid-ac-action -n -t int -s 0
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/button-lid-battery-action -n -t int -s 0
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/button-power-ac-action -n -t int -s 0
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/button-power-battery-action -n -t int -s 0
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/button-suspend-ac-action -n -t int -s 0
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/button-suspend-battery-action -n -t int -s 0
xbacklight -set 100

xhost + && sleep 1 && sudo -s pkexec calamares-tuxedo &
