bazzite/system_files/desktop/shared/usr/bin/bazzite-discover-overlay
Kyle Gospodnetich 4aa7fabcd5 fix(gnome): Fix issue with xdg-terminal-exec when used with long commands
chore: Additional bash script cleanup
2023-12-23 09:56:09 -08:00

18 lines
832 B
Bash
Executable File

#!/usr/bin/bash
source /etc/default/discover-overlay
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO)
# Run discover-overlay if discord is installed and we aren't using Wayland.
if [[ ${AUTO_LAUNCH_DISCOVER_OVERLAY} == 1 ]]; then
if grep -q "com.discordapp.Discord\|xyz.armcord.ArmCord\|de.shorsh.discord-screenaudio\|io.github.spacingbat3.webcord\|dev.vencord.Vesktop" <<< $(/usr/bin/flatpak list --app --columns=application); then
if [[ ${BASE_IMAGE_NAME} =~ "kinoite" || "$XDG_SESSION_TYPE" != "wayland" ]]; then
/usr/bin/discover-overlay "$@"
elif [[ ${BASE_IMAGE_NAME} =~ "silverblue" && "$XDG_SESSION_TYPE" == "wayland" && "${LAUNCH_DISCOVER_ON_GNOME_WAYLAND}" == 1 ]]; then
env GDK_BACKEND=x11 /usr/bin/discover-overlay "$@"
fi
fi
fi