Skip to content

Commit

Permalink
Enable Wayland support as an opt-in feature
Browse files Browse the repository at this point in the history
Closes #248
Closes #287
  • Loading branch information
TingPing committed Apr 26, 2023
1 parent f1f6302 commit a2f7a44
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ However, this sandboxing prevents the following features from working:
- **Rich Presence**: See [this page](https://github.com/flathub/com.discordapp.Discord/wiki/Rich-Precense-(discord-rpc)) if you want to expose Discord's rich presence interface for other applications.


### Wayland

This package enables the flags to run on Wayland, however it is opt-in. To opt-in run:

```sh
flatpak override --user --socket=wayland com.discordapp.Discord
```

To opt-out do the same with `--nosocket=wayland`.

## Legal

The Discord app itself is **proprietary** (closed source).
Expand Down
7 changes: 6 additions & 1 deletion discord.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ socat $SOCAT_ARGS \
&
socat_pid=$!

FLAGS='--enable-gpu-rasterization --enable-zero-copy --enable-gpu-compositing --enable-native-gpu-memory-buffers --enable-oop-rasterization --enable-features=UseSkiaRenderer'
FLAGS='--enable-gpu-rasterization --enable-zero-copy --enable-gpu-compositing --enable-native-gpu-memory-buffers --enable-oop-rasterization --enable-features=UseSkiaRenderer,WaylandWindowDecorations'

if [[ -e "$XDG_RUNTIME_DIR/wayland-0" ]]
then
FLAGS="$FLAGS --ozone-platform-hint=auto"
fi

if [[ $XDG_SESSION_TYPE == "wayland" ]] && [ -c /dev/nvidia0 ]
then
Expand Down

0 comments on commit a2f7a44

Please sign in to comment.