#!/usr/bin/env bash
echo 'Starting installation'

echo 'Installing Depending Repositories...'
echo 'Installing RPMFusion'
sudo dnf install -y \
    https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
    https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

echo 'Enabling Cisco openh264'
sudo dnf config-manager --set-enabled fedora-cisco-openh264

echo 'Installing base packages...'
sudo dnf install -y \
    git zsh which util-linux-user vim-enhanced

#echo 'Install fancy programming stuff...'
#sudo dnf install -y \
#    tig \
#    php-cli php-json php-mysqli php-zip php-xml php-mbstring php-xdebug mysql wp-cli composer java

#echo 'Install locale...'
#sudo dnf install -y \
#    langpacks-de

#echo 'Install my desktop stuff...'
#sudo dnf install -y \
#    awesome picom dex-autostart pavucontrol

echo 'Installing graphical applications...'
sudo dnf install -y \
    guake firefox keepassxc nextcloud-client

#echo 'Installing extended graphical applications...'
#sudo dnf install -y \
#    gvim thunderbird filezilla telegram-desktop libreoffice lpf-spotify-client \
#    flameshot ibus-uniemoji xsel mpv xt7-player-mpv

#echo 'Install work packages'
#sudo dnf install -y \
#    apache-ant pedit \

# Docker and Teamviewer are still a problem on Fedora 32
# sudo dnf install -y \
#     docker-ce docker-compose \
#     teamviewer

cd ~
mkdir workspace
cd workspace
git clone https://git.doggoat.de/dhalucario/devconf.git
git submodule update --init --recusive
cd devconf
./install-light.sh

echo 'Switching shell to zsh...'
chsh -s $(which zsh)

mkdir ~/bin/

vim +PlugInstall +qall
echo 'Done'
