Configure remotes in plasma session

This commit is contained in:
Manuel Thalmann 2024-03-09 21:42:26 +01:00
parent 9282eabc07
commit a5f91f51ed

View file

@ -2,28 +2,54 @@
NEXTCLOUD_DIR="${NEXTCLOUD_DIR:-Nextcloud}"; NEXTCLOUD_DIR="${NEXTCLOUD_DIR:-Nextcloud}";
PROTON_DIR="${PROTON_DIR:-Proton}"; PROTON_DIR="${PROTON_DIR:-Proton}";
INSTALL_FONTS="${INSTALL_FONTS}"; 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 then
# Microsoft Windows Fonts entryPoint=~/.config/autostart/PortValhallaProfile.desktop;
source "../Fonts/MicrosoftFonts/install.sh";
{
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; 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;