#!/bin/bash

sed -e "s|HOME|/${HOME##/srv/samba/schools/default-school/}|g" -e "s|USER|${USER}|g" > ~/.local/share/user-places.xbel <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xbel>
<xbel xmlns:mime="http://www.freedesktop.org/standards/shared-mime-info" xmlns:bookmark="http://www.freedesktop.org/standards/desktop-bookmarks" xmlns:kdepriv="http://www.kde.org/kdepriv">
 <info>
  <metadata owner="http://www.kde.org">
   <kde_places_version>4</kde_places_version>
   <GroupState-Places-IsHidden>false</GroupState-Places-IsHidden>
   <GroupState-Remote-IsHidden>false</GroupState-Remote-IsHidden>
   <GroupState-Devices-IsHidden>false</GroupState-Devices-IsHidden>
   <GroupState-RemovableDevices-IsHidden>false</GroupState-RemovableDevices-IsHidden>
   <GroupState-Tags-IsHidden>false</GroupState-Tags-IsHidden>
   <withRecentlyUsed>true</withRecentlyUsed>
   <GroupState-RecentlySaved-IsHidden>false</GroupState-RecentlySaved-IsHidden>
   <withBaloo>true</withBaloo>
   <GroupState-SearchFor-IsHidden>false</GroupState-SearchFor-IsHidden>
  </metadata>
 </info>
 <bookmark href="file:///srv/samba/schools/default-schoolHOME">
  <title>Home</title>
  <info>
   <metadata owner="http://freedesktop.org">
    <bookmark:icon name="user-home"/>
   </metadata>
   <metadata owner="http://www.kde.org">
    <ID>1682498425/0</ID>
    <isSystemItem>true</isSystemItem>
   </metadata>
  </info>
 </bookmark>
 <bookmark href="file:///srv/samba/schools/default-schoolHOME/Schreibtisch">
  <title>Desktop</title>
  <info>
   <metadata owner="http://freedesktop.org">
    <bookmark:icon name="user-desktop"/>
   </metadata>
   <metadata owner="http://www.kde.org">
    <ID>1682498425/1</ID>
    <isSystemItem>true</isSystemItem>
   </metadata>
  </info>
 </bookmark>
 <bookmark href="file:///srv/samba/schools/default-schoolHOME/Dokumente">
  <title>Documents</title>
  <info>
   <metadata owner="http://freedesktop.org">
    <bookmark:icon name="folder-documents"/>
   </metadata>
   <metadata owner="http://www.kde.org">
    <ID>1682498425/2</ID>
    <isSystemItem>true</isSystemItem>
   </metadata>
  </info>
 </bookmark>
 <bookmark href="file:///srv/samba/schools/default-schoolHOME/Downloads">
  <title>Downloads</title>
  <info>
   <metadata owner="http://freedesktop.org">
    <bookmark:icon name="folder-downloads"/>
   </metadata>
   <metadata owner="http://www.kde.org">
    <ID>1682498425/3</ID>
    <isSystemItem>true</isSystemItem>
   </metadata>
  </info>
 </bookmark>
 <bookmark href="file:///srv/samba/schools/default-schoolHOME/Musik">
  <title>Music</title>
  <info>
   <metadata owner="http://freedesktop.org">
    <bookmark:icon name="folder-music"/>
   </metadata>
   <metadata owner="http://www.kde.org">
    <ID>1682498425/6</ID>
    <isSystemItem>true</isSystemItem>
   </metadata>
  </info>
 </bookmark>
 <bookmark href="file:///srv/samba/schools/default-schoolHOME/Bilder">
  <title>Pictures</title>
  <info>
   <metadata owner="http://freedesktop.org">
    <bookmark:icon name="folder-pictures"/>
   </metadata>
   <metadata owner="http://www.kde.org">
    <ID>1682498425/7</ID>
    <isSystemItem>true</isSystemItem>
   </metadata>
  </info>
 </bookmark>
 <bookmark href="file:///srv/samba/schools/default-schoolHOME/Videos">
  <title>Videos</title>
  <info>
   <metadata owner="http://freedesktop.org">
    <bookmark:icon name="folder-videos"/>
   </metadata>
   <metadata owner="http://www.kde.org">
    <ID>1682498425/8</ID>
    <isSystemItem>true</isSystemItem>
   </metadata>
  </info>
 </bookmark>
 <bookmark href="file:///srv/samba/schools/default-school/share">
  <title>Tausch</title>
  <info>
   <metadata owner="http://freedesktop.org">
    <bookmark:icon name="folder-publicshare"/>
   </metadata>
   <metadata owner="http://www.kde.org">
    <ID>1682498425/9</ID>
    <isSystemItem>true</isSystemItem>
   </metadata>
  </info>
 </bookmark>
 <bookmark href="file:///lmn/media/USER/nextcloud">
  <title>Nextcloud</title>
  <info>
   <metadata owner="http://freedesktop.org">
    <bookmark:icon name="folder-cloud"/>
   </metadata>
   <metadata owner="http://www.kde.org">
    <ID>1682498425/10</ID>
    <isSystemItem>true</isSystemItem>
   </metadata>
  </info>
 </bookmark>
 <bookmark href="remote:/">
  <title>Network</title>
  <info>
   <metadata owner="http://freedesktop.org">
    <bookmark:icon name="folder-network"/>
   </metadata>
   <metadata owner="http://www.kde.org">
    <ID>1682498425/4</ID>
    <isSystemItem>true</isSystemItem>
   </metadata>
  </info>
 </bookmark>
 <bookmark href="trash:/">
  <title>Trash</title>
  <info>
   <metadata owner="http://freedesktop.org">
    <bookmark:icon name="user-trash"/>
   </metadata>
   <metadata owner="http://www.kde.org">
    <ID>1682498425/5</ID>
    <isSystemItem>true</isSystemItem>
   </metadata>
  </info>
 </bookmark>
 <bookmark href="recentlyused:/files">
  <title>Recent Files</title>
  <info>
   <metadata owner="http://freedesktop.org">
    <bookmark:icon name="document-open-recent"/>
   </metadata>
   <metadata owner="http://www.kde.org">
    <ID>1682498425/9</ID>
    <isSystemItem>true</isSystemItem>
   </metadata>
  </info>
 </bookmark>
 <bookmark href="recentlyused:/locations">
  <title>Recent Locations</title>
  <info>
   <metadata owner="http://freedesktop.org">
    <bookmark:icon name="folder-open-recent"/>
   </metadata>
   <metadata owner="http://www.kde.org">
    <ID>1682498425/10</ID>
    <isSystemItem>true</isSystemItem>
   </metadata>
  </info>
 </bookmark>
 <separator>
  <info>
   <metadata owner="http://www.kde.org">
    <UDI>/org/kde/fstab///server/default-school/:/srv/samba/schools/default-school</UDI>
    <isSystemItem>true</isSystemItem>
    <IsHidden>true</IsHidden>
   </metadata>
  </info>
 </separator>
 <separator>
  <info>
   <metadata owner="http://www.kde.org">
    <UDI>/org/kde/fstab///server/default-school/:/lmn/media/USER/home</UDI>
    <isSystemItem>true</isSystemItem>
    <IsHidden>true</IsHidden>
   </metadata>
  </info>
 </separator>
 <separator>
  <info>
   <metadata owner="http://www.kde.org">
    <UDI>/org/kde/fstab///server/sysvol/:/srv/samba/USER/sysvol</UDI>
    <isSystemItem>true</isSystemItem>
    <IsHidden>true</IsHidden>
   </metadata>
  </info>
 </separator>
 <separator>
  <info>
   <metadata owner="http://www.kde.org">
    <UDI>/org/kde/fstab///server/default-school/:/lmn/media/USER/share</UDI>
    <isSystemItem>true</isSystemItem>
    <IsHidden>true</IsHidden>
   </metadata>
  </info>
 </separator>
 <separator>
  <info>
   <metadata owner="http://www.kde.org">
    <UDI>/org/freedesktop/UDisks2/block_devices/sda2</UDI>
    <isSystemItem>true</isSystemItem>
   </metadata>
  </info>
 </separator>
</xbel>
EOF
