Skip to content

Instantly share code, notes, and snippets.

@hibiii
Created February 27, 2025 21:28
Show Gist options
  • Select an option

  • Save hibiii/c539c157b4200fdb9ea70a4c6e1bec12 to your computer and use it in GitHub Desktop.

Select an option

Save hibiii/c539c157b4200fdb9ea70a4c6e1bec12 to your computer and use it in GitHub Desktop.
Discord Canary Linux Wrapper + Vencord

This is a very simple wrapper to allow Discord to "auto-update" whenever you launch it. Additionally, the wrapper installs Vencord automatically.

Installation

The wrapper assumes the following things:

  • There already is a Discord Canary install in ~/.local/share/DiscordCanary/.
  • Zenity is installed.
  • VencordInstaller is present on Discord Canary's install folder.

The wrapper can be placed in any directory, but it's recommended to place the wrapper in Discord Canary's install folder. Reminder that you may have to make the wrapper executable.

Update your desktop shortcuts to point to the wrapper rather than the DiscordCanary executable.

Why

Because I don't like Better Discord, Vesktop uses too much ******* RAM of my computer (its bottleneck), and Moonlight hasn't quite hit its potential yet. and the funny h.

#!/bin/bash
set -xe
pushd "$HOME/.local/share/DiscordCanary"
# Check for updates
INSTALLED_VERSION="`cat _discord_version || true`"
API_VERSION="`
curl --head 'https://discordapp.com/api/download/canary?platform=linux&format=tar.gz' \
| grep '^location: ' | grep --only-matching '[^/]*$'
`"
if [[ "$INSTALLED_VERSION" != "$API_VERSION" ]]; then
exec 3> >(zenity --progress --no-cancel --pulsate --auto-close --title='Discord Canary' --text='Updating Discord Canary...' --width=400)
# Download the update
TEMP_DIR="`mktemp -d`"
pushd "$TEMP_DIR"
wget 'https://discordapp.com/api/download/canary?platform=linux&format=tar.gz' --output-document='latest_discord.tar.gz'
tar --directory="$HOME/.local/share/" --extract --ungzip --file='latest_discord.tar.gz'
popd
rm -r "$TEMP_DIR"
echo "$API_VERSION" > _discord_version
chmod +x DiscordCanary
./VencordInstallerCli-linux -update-self || true
chmod +x VencordInstallerCli-linux
./VencordInstallerCli-linux -install -branch canary
exec 3<&-
fi
./DiscordCanary --enable-speech-dispatcher \
|| zenity --error --text="Discord Canary failed to launch. Please verify your installation." --title="Discord Canary"
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment