diff --git a/README.md b/README.md
index 0e3bda7..9afd5ac 100644
--- a/README.md
+++ b/README.md
@@ -1,17 +1,28 @@
-# Requires
-1. youtube-dl
-2. animated-wallpaper
+# Requires (shipped by awp_install_script.sh)
+1. ffmpeg
+2. youtube-dl
+3. animated-wallpaper
# Installation
+## Automatic installation
+**This will install the dependencies directly with and move the files to the correct places.**
+**! Only for Fedora !**
+1. chmod +x awp_install_script.sh
+2. ./awp_install_script.sh
+
+## Manual Installation
1. Move the folder "awp" to /usr/local/share/
2. Move the ".desktop" file to /usr/share/applications/
3. chmod +x /usr/local/share/awp/awp.sh
4. chmod +x /usr/local/share/awp/awp_autostart.sh
5. Reload GNOME - X11 press f2 and then r
+# Notice:
+The X11 version of GNOME is recommended for this, as this will only work on a Wayland workspace.
+
## Icon from:
https://icon-icons.com/icon/wallpaper/104166
Jeremiah
diff --git a/animation-wallpaper.desktop b/awp.desktop
similarity index 100%
rename from animation-wallpaper.desktop
rename to awp.desktop
diff --git a/awp/awp-autostart.desktop b/awp/awp-autostart.desktop
new file mode 100644
index 0000000..26fa94a
--- /dev/null
+++ b/awp/awp-autostart.desktop
@@ -0,0 +1,14 @@
+[Desktop Entry]
+Name=Animated Wallpaper Autostart
+Name[de]=Animierte Hintergrundbilder Autostart
+Comment[de]=Verwaltung von animierten Hintergrundbildern - Autostart
+Comment=Control of animated Wallpaper - Autostart
+Keywords[de]=Hintergrund;Animation;Wallpaper;
+Keywords=Animation;Wallpaper;GTK;Background;
+OnlyShowIn=GNOME;Unity;
+Exec=/usr/local/share/awp/awp-autostart.sh
+Icon=/usr/local/share/awp/awp_wallpaper_icon.png
+StartupNotify=false
+Terminal=false
+Type=Application
+Categories=GNOME;GTK;Core;Utility;Graphics;
\ No newline at end of file
diff --git a/awp/awp_autostart.sh b/awp/awp-autostart.sh
old mode 100644
new mode 100755
similarity index 100%
rename from awp/awp_autostart.sh
rename to awp/awp-autostart.sh
diff --git a/awp/awp.sh b/awp/awp.sh
index 18448ba..46093ca 100755
--- a/awp/awp.sh
+++ b/awp/awp.sh
@@ -5,8 +5,8 @@ Bilddir="$HOME/Animated_Wallpapers/Bild"
mkdir -p $Bilddir
cd $Download
-INPUT=$(zenity --list --title "Animated Wallpaper Helper" --text "What do you want?"\
- --column "Selection" --column "Typ" --radiolist TRUE "Existing" FALSE "New" FALSE "Start Animated Wallpapers" FALSE "Stop Animated Wallpapers"\
+INPUT=$(zenity --list --title "Animated Wallpaper Helper" --window-icon=/usr/local/share/awp/awp_wallpaper_icon.png --text "What do you want?"\
+ --column "Selection" --column "Typ" --radiolist FALSE "Existing" FALSE "New" TRUE "Start Animated Wallpapers" FALSE "Stop Animated Wallpapers" FALSE "Enable Autostart" FALSE "Disable Autostart"\
--width=600 --height=250)
@@ -17,12 +17,47 @@ then
Video=$(zenity --file-selection --title "Choose the live wallpaper" --filename='$Download' --width=600 --file-filter=""*.mkv" "*.webm"")
-echo $Video > lastvideo.txt
-cd Bild
-Bild=$(zenity --file-selection --title "Select the corresponding still image" --filename='$Bilddir' --width=600 --file-filter=""*.png" "*.jpg" "*.jpeg"")
+case $? in
+
+0)
+ echo "select Video"
+ ;;
+1)
+ echo "Aborted"
+ exit 0
+ ;;
+-1)
+ zenity --info --width 500\
+ --text="Oops. This should not happen."
+ exit 0
+ ;;
+
+esac
+
+ cd $Bilddir
+ Bild=$(zenity --file-selection --title "Select the corresponding still image" --filename='$Bilddir' --width=600 --file-filter=""*.png" "*.jpg" "*.jpeg"")
+
+ case $? in
+
+ 0)
+ echo "select Picture"
+ ;;
+
+ 1)
+ echo "Aborted"
+ exit 0
+ ;;
+ -1)
+ zenity --info --width 500\
+ --text="Oops. This should not happen."
+ exit 0
+ ;;
+
+ esac
+
cd ..
echo $Bild > lastpicture.txt
-
+echo $Video > lastvideo.txt
killall animated-wallpaper
gsettings set org.gnome.desktop.background picture-uri file://$Bild\
@@ -65,7 +100,20 @@ killall animated-wallpaper
gsettings set org.gnome.desktop.background picture-uri file://$Bilddir/$NAME.png\
&& animated-wallpaper $NAME.* & exit 0
+fi
+if [ "$INPUT" == "Enable Autostart" ]
+then
+
+cp /usr/local/share/awp/awp-autostart.desktop $HOME/.config/autostart/
+sh /usr/local/share/awp/awp.sh
fi
+if [ "$INPUT" == "Disable Autostart" ]
+then
+
+rm -f $HOME/.config/autostart/awp-autostart.desktop
+sh /usr/local/share/awp/awp.sh
+
+fi
diff --git a/install.sh b/install.sh
new file mode 100755
index 0000000..35c2a4d
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,70 @@
+#!/bin/bash
+
+if [ $(whoami) != 'root' ]; then
+ echo "Please run as root"
+
+ else
+
+ # Detect OS
+if [ -f /etc/os-release ]; then
+ # freedesktop.org and systemd
+ . /etc/os-release
+ OS=$NAME
+elif type lsb_release >/dev/null 2>&1; then
+ OS=$(lsb_release -si)
+elif [ -f /etc/lsb-release ]; then
+ . /etc/lsb-release
+ OS=$DISTRIB_ID
+else
+ # Fall back to uname, e.g. "Linux ", also works for BSD, etc.
+ OS=$(uname -s)
+ VER=$(uname -r)
+fi
+
+# Install Dependencies
+ if [ "$OS" == "Fedora" ]; then
+ # Fedora
+
+ zenity --question --width 500\
+ --text="Installation for Fedora initiated. It needs to intigrate the rpmfusion repository for ffmpeg. Do you agree with this?"
+
+ case $? in
+ 0)
+ echo Install Fedora Dependencies
+ echo Add rpmfusion repository for ffmpeg
+ dnf install -y https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
+ echo Install dev tools and dependencies
+ dnf install -y cmake gcc-c++ vala pkgconfig gtk3-devel clutter-devel clutter-gtk-devel clutter-gst3-devel youtube-dl ffmpeg
+ ;;
+ 1)
+ zenity --info --width 500\
+ --text="Unfortunately, it is not possible for me to work like this."
+ exit 0
+ ;;
+ -1)
+ zenity --info --width 500\
+ --text="Oops. This should not happen."
+ exit 0
+ ;;
+ esac
+ fi
+
+
+# Clone and Install animated-wallpaper
+echo 'Clone animated-wallpaper from github. (https://github.com/Ninlives/animated-wallpaper)'
+
+git clone https://github.com/Ninlives/animated-wallpaper
+cd animated-wallpaper
+cmake . && make && make install
+cd ..
+rm -rf animated-wallpaper
+
+# Clone and Install animated_wallpaper_helper
+
+cp -r awp /usr/local/share/
+cp awp.desktop /usr/share/applications/
+chmod +x /usr/local/share/awp/awp.sh
+chmod +x /usr/local/share/awp/awp-autostart.sh
+
+fi
+