#!/bin/bash

for FICH in /usr/share/lxpanel/profile/Lubuntu/panels/panel \
/usr/share/lxpanel/profile/default/panels/panel \
/etc/xdg/lxpanel/default/panels/panel \
/etc/skel/.config/lxpanel/Lubuntu/panels/panel \
/etc/skel/.config/lxpanel/default/panels/panel \
"$(vx-home-usuario-grafico)/.config/lxpanel/Lubuntu/panels/panel" \
"$(vx-home-usuario-grafico)/.config/lxpanel/default/panels/panel" ; do
    if [ -f "${FICH}" ] ; then
        grep -q "transparent=1" "${FICH}" && \
        sed -i "s/transparent=1/transparent=0/g" "${FICH}"
    fi
done

# Para evitar problemas con la barra opaca: ficheros .dpkg-dist
[[ -f "$(vx-home-usuario-grafico)/.config/lxpanel/default/panels/panel.dpkg-dist" ]]
rm -rf "$(vx-home-usuario-grafico)/.config/lxpanel/default/panels/panel.dpkg-dist"
find /etc/skel -type f -name "*.dpkg-dist" -delete
find /etc/skel -type f -name "*.dpkg-old" -delete

exit 0