[[ "${UID}" -lt 10000 ]] && return

# Desktop Verzeichnis?
DESKDIR=$(xdg-user-dir DESKTOP)
echo $DESKDIR >> /tmp/login.log

# Wallpaper
chmod u+x "$HOME/.config/plasma-org.kde.plasma.desktop-appletsrc"
kwriteconfig5 --file "$HOME/.config/plasma-org.kde.plasma.desktop-appletsrc" --group 'Containments' --group '1' --group 'Wallpaper' --group 'org.kde.image' --group 'General'  --key 'Image' "/usr/local/share/qgm/qgm_background_wallpaper.jpg" || return
# DiscoverButton löschen funzt noch nicht
kwriteconfig5 --file "$HOME/.config/plasma-org.kde.plasma.desktop-appletsrc" --group 'Containments' --group '2' --group 'Applets' --group '5' --group 'Configuration' --group 'General' --key 'launchers' "applications:systemsettings.desktop,preferred://filemanager,preferred://browser" || return

# Beamer-Icon
rm -f $DESKDIR/qgm-beamersetup.desktop 
if [[ $(hostname -s) = lt-* || $(hostname -s) = r109-dell16  ]]; then 
    cp /usr/share/applications/qgm-beamersetup.desktop $DESKDIR/qgm-beamersetup.desktop 
    chmod 755 $DESKDIR/qgm-beamersetup.desktop
fi

# Abmelden Knopf
echo "cp /usr/share/applications/qgm-abmelden.desktop $DESKDIR/qgm-abmelden.desktop" >> /tmp/login.log
cp /usr/share/applications/qgm-abmelden.desktop $DESKDIR/qgm-abmelden.desktop
chmod 755 $DESKDIR/qgm-abmelden.desktop

# user-places löschen, wegen Schuljahreswechsel...
echo "rm $HOME/.local/share/user-places.xbel" >> /tmp/login.log
rm $HOME/.local/share/user-places.xbel

echo "Done" >> /tmp/login.log
