Created
July 15, 2025 05:34
-
-
Save Urpagin/4f0ee1e0571fdfddfff6f56104d19cfb to your computer and use it in GitHub Desktop.
Patches the annoying Discord update pop-up on Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Patches the annoying update Discord pop-up on Linux. | |
| # Author: Urpagin | |
| # Date: 2025-07-15 | |
| # Multiline command | |
| command -v jq >/dev/null 2>&1 && \ | |
| f="$HOME/.config/discord/settings.json" && \ | |
| { [[ -f "$f" ]] \ | |
| && c=$(jq '.SKIP_HOST_UPDATE = true' "$f") \ | |
| && [[ -n "$c" ]] || ! echo "Error: the new content is empty" \ | |
| && printf '%s\n' "$c" > "$f" && echo "JSON file successfully updated!" \ | |
| || echo "Failed to update '${f}'. JSON error, or file does not exist.";} \ | |
| || echo "jq not installed." | |
| # One liner | |
| #command -v jq >/dev/null 2>&1 && f="$HOME/.config/discord/settings.json" && { [[ -f "$f" ]] && c=$(jq '.SKIP_HOST_UPDATE = true' "$f") && [[ -n "$c" ]] || ! echo "Error: the new content is empty" && printf '%s\n' "$c" > "$f" && echo "JSON file successfully updated!" || echo "Failed to update '${f}'. JSON error, or file does not exist.";} || echo "jq not installed." | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment