summarylogtreecommitdiffstats
path: root/discord.sh
blob: fe730579f7b6c890b4025b270c3751ef2315bbda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/bash

if [ ${XDG_SESSION_TYPE} = wayland ]; then
	export launchTarget="/opt/discord/Discord --disable-setuid-sandbox --no-sandbox $@ --ozone-platform-hint=auto --wayland-text-input-version=3"
else
	export launchTarget="/opt/discord/Discord --disable-setuid-sandbox --no-sandbox $@"
fi

export _portalConfig=/usr/lib/portable/info/com.discord.app/config

if [[ "$@" = "--actions opendir" ]]; then
	exec portable --actions opendir
elif [[ "$@" = "--actions share-files" ]]; then
	exec portable --actions share-files
elif [[ "$@" = "--actions quit" ]]; then
	exec portable --actions quit
else
	exec portable "$@"
fi