#!/bin/bash
cat > $HOME/.config/autostart/lxro_start.desktop << EOF
[Desktop Entry]
Name=LXRotatorStart
Exec=$HOME/.config/lxrotator/lxrostart
Type=Application
EOF

cat > $HOME/.config/lxrotator/lxrostart << EOF
#!/bin/bash
# simple launcher to start lxrotator with delay
# you don't edit this file
sleep \`cat $HOME/.config/lxrotator/lxrotator | grep delay -m1 | cut -d "=" -f2\`s
$HOME/.config/lxrotator/lxrotator &
exit 0
EOF
chmod 744 $HOME/.config/lxrotator/lxrostart
exit 9

