Configure remotes in plasma session

This commit is contained in:
Manuel Thalmann 2024-03-09 21:42:26 +01:00
parent bdb33272f0
commit e6058d8347

View file

@ -2,28 +2,54 @@
NEXTCLOUD_DIR="${NEXTCLOUD_DIR:-Nextcloud}";
PROTON_DIR="${PROTON_DIR:-Proton}";
INSTALL_FONTS="${INSTALL_FONTS}";
dir="${BASH_SOURCE%/*}";
pushd "$dir" > /dev/null;
. "../../Scripts/is-truthy.sh";
if isTruthy "$INSTALL_FONTS"
if [ "$XDG_SESSION_TYPE" = "tty" ]
then
# Microsoft Windows Fonts
source "../Fonts/MicrosoftFonts/install.sh";
entryPoint=~/.config/autostart/PortValhallaProfile.desktop;
{
echo "#!/usr/bin/env xdg-open";
echo "[Desktop Entry]";
echo "Name=PortValhalla Profile";
echo "Type=Application";
echo "Terminal=false";
echo -n "Exec=env "
echo -n "NEXTCLOUD_DIR=\"${NEXTCLOUD_DIR}\" ";
echo -n "PROTON_DIR=\"${PROTON_DIR}\" ";
echo -n "INSTALL_FONTS=\"${INSTALL_FONTS}\" ";
echo -n "konsole -e bash -e $(realpath $BASH_SOURCE)";
} > "$entryPoint";
chmod a+x "$entryPoint";
dbus-launch --exit-with-session startplasma-wayland > /dev/null 2>&1;
rm "$entryPoint";
else
dir="${BASH_SOURCE%/*}";
pushd "$dir" > /dev/null;
. "../../Scripts/is-truthy.sh";
if isTruthy "$INSTALL_FONTS"
then
# Microsoft Windows Fonts
source "../Fonts/MicrosoftFonts/install.sh";
fi;
# Sync clouds
echo "Please complete the setup of your profile!";
NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" . "../rclone/InstallSync.sh" nextcloud "$NEXTCLOUD_DIR";
PROTON_DIR="${PROTON_DIR}" . "../rclone/InstallSync.sh" proton "$PROTON_DIR";
if isTruthy "$INSTALL_FONTS"
then
# Install fonts
NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" source "../Fonts/NerdFont/install.sh";
fi;
source "../bash/oh-my-posh.sh";
source "../fish/oh-my-posh.sh";
NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" source "../Oh My Posh/install.sh";
echo "You are done! Please log out!";
read;
popd > /dev/null;
fi;
# Sync clouds
NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" . "../rclone/InstallSync.sh" nextcloud "$NEXTCLOUD_DIR";
PROTON_DIR="${PROTON_DIR}" . "../rclone/InstallSync.sh" proton "$PROTON_DIR";
if isTruthy "$INSTALL_FONTS"
then
# Install fonts
NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" source "../Fonts/NerdFont/install.sh";
fi;
source "../bash/oh-my-posh.sh";
source "../fish/oh-my-posh.sh";
NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" source "../Oh My Posh/install.sh";
popd > /dev/null;