···11-#!/usr/bin/bash
22-33-set -euo pipefail
44-55-name=discord
66-electron=electron26
77-flags_file="${XDG_CONFIG_HOME:-$HOME/.config}/${name}-flags.conf"
88-99-declare -a flags
1010-1111-if [[ -f "${flags_file}" ]]; then
1212- mapfile -t <"${flags_file}"
1313-fi
1414-1515-for line in "${MAPFILE[@]}"; do
1616- if [[ ! "${line}" =~ ^[[:space:]]*#.* ]] && [[ -n "${line}" ]]; then
1717- flags+=("${line}")
1818- fi
1919-done
2020-2121-exec /usr/bin/${electron} /usr/share/${name}/resources/app.asar "${flags[@]}" "$@"
+1-1
discord/.local/share/applications/discord.desktop
···33StartupWMClass=discord
44Comment=All-in-one voice and text chat for gamers that's free, secure, and works on both your desktop and phone.
55GenericName=Internet Messenger
66-Exec=/home/bas/bin/discord
66+Exec=/usr/bin/discord --enable-features=UseOzonePlatform --ozone-platform=wayland
77Icon=discord
88Type=Application
99Categories=Network;InstantMessaging;