#!/bin/bash

command="$1"

if [ "$command" == "winos" ]; then

    # install Windows layout theme
    echo Installing Windows layout theme

    if [ -f $HOME/.config/autostart/plank.desktop ]; then
        rm $HOME/.config/autostart/plank.desktop
    fi

    cp /usr/share/layoutswitcher/layouts/winos/config/xfce4/xfconf/xfce-perchannel-xml/* $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/

fi

if [ "$command" == "macos" ]; then

    # install MacOS layout theme
    echo Installing MacOS layout theme
    
    cp -R /usr/share/layoutswitcher/layouts/macos/config/autostart $HOME/.config/
    cp -R /usr/share/layoutswitcher/layouts/macos/config/dconf $HOME/.config/
    cp -R /usr/share/layoutswitcher/layouts/macos/config/plank $HOME/.config/
    mkdir $HOME/.themes
    cp -R /usr/share/layoutswitcher/layouts/macos/themes/WhiteSur-light $HOME/.themes/
    cp /usr/share/layoutswitcher/layouts/macos/config/xfce4/xfconf/xfce-perchannel-xml/* $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/

    cp -R /usr/share/layoutswitcher/layouts/macos/local/share/plank $HOME/.local/share/

fi