VesktopCustomCommands
VCC is a system that allows you to add a mute and deafen global shortcut to Vesktop, it is a workaround to the lack of global shortcuts in Vesktop for now and until a better solution is found by the Vesktop team.
Install / Use
/learn @NitramO-YT/VesktopCustomCommandsREADME
Introduction to vesktopCustomCommands (VCC)
VCC is a system that allows you to add a mute and deafen global shortcut to Vesktop, it is a workaround to the lack of global shortcuts in Vesktop for now and until a better solution is found by the Vesktop team.
It's basically a set of scripts (mute.sh & deafen.sh) that you can call from a custom global shortcut in your system to mute and deafen yourself in Vesktop, and it triggers theses actions in Vesktop by injecting a custom Javascript code in the Vencord main file.
Shortcuts configuration in your system
You need to configure a custom global shortcut in your system to call the scripts mute.sh and deafen.sh in ~/.vesktopCustomCommands/ folder.
~/.vesktopCustomCommands/mute.sh
~/.vesktopCustomCommands/deafen.sh
Installation
Automatic installation
Run this command in your terminal and follow the instructions:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/NitramO-YT/vesktopCustomCommands/refs/heads/main/install.sh)"
Note: If a config file already exists at ~/.vesktopCustomCommands/.config, the installer preserves it and only updates the vencord_path entry if necessary.
Optional: Automatic repatch
During installation, you can enable an automatic repatch system that periodically checks whether the VCC patch is still present in the Vencord main file and re-applies it if it has been removed (e.g. after an update or a reset of Vencord/Vesktop).
-
Why is it needed? Vesktop/Vencord updates or certain startup scenarios can restore the main file to its original state, removing the VCC injection. The auto-repatch ensures your shortcuts keep working without manual intervention.
-
Settings are stored in
~/.vesktopCustomCommands/.config:auto_repatch="true|false"(default:false)auto_restart="true|false"(default:false) – if enabled, Vesktop will be automatically restarted after a repatch. You can toggle this later with the commands below.autorepatch_interval="30s|1m|3m"(default:30s) – interval of checks.- A user
systemdtimer runs at the chosen interval whenauto_repatchis enabled. - To enable auto-repatch :
bash -c "$(curl -fsSL https://raw.githubusercontent.com/NitramO-YT/vesktopCustomCommands/refs/heads/main/dist/vesktopCustomCommands/enable_autorepatch.sh)"- To disable auto-repatch :
bash -c "$(curl -fsSL https://raw.githubusercontent.com/NitramO-YT/vesktopCustomCommands/refs/heads/main/dist/vesktopCustomCommands/disable_autorepatch.sh)"- To enable auto-restart (after repatch):
bash -c "$(curl -fsSL https://raw.githubusercontent.com/NitramO-YT/vesktopCustomCommands/refs/heads/main/dist/vesktopCustomCommands/enable_autorestart.sh)"- To disable auto-restart:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/NitramO-YT/vesktopCustomCommands/refs/heads/main/dist/vesktopCustomCommands/disable_autorestart.sh)"
Manual configuration: edit ~/.vesktopCustomCommands/.config and set auto_repatch and auto_restart. You can also set autorepatch_interval to "30s", "1m" or "3m". If you disable it manually, the timer will be stopped on the next install run, or run the disable script above.
Optional: Automatic update
You can enable an automatic update system that periodically checks if a newer version is available on GitHub and updates the necessary files (custom code for Vencord and local scripts like mute.sh and deafen.sh).
- Settings in
~/.vesktopCustomCommands/.config:auto_update="true|false"(default:false)auto_update_interval(default:15m) – the timer runs atautorepatch_intervalif auto-repatch is enabled, otherwise atauto_update_intervalif only auto-update is enabled.
- To enable auto-update :
bash -c "$(curl -fsSL https://raw.githubusercontent.com/NitramO-YT/vesktopCustomCommands/refs/heads/main/dist/vesktopCustomCommands/enable_autoupdate.sh)" - To disable auto-update :
bash -c "$(curl -fsSL https://raw.githubusercontent.com/NitramO-YT/vesktopCustomCommands/refs/heads/main/dist/vesktopCustomCommands/disable_autoupdate.sh)"
Manual installation
- Download the
distfolder from the repository or its content. distis separated in two parts:vencordfolder contains the files to inject in the Vencord main file.vesktopCustomCommandsfolder contains the scripts to mute/deafen and the.configfile.
- You can make a backup of your Vencord main file (usually located in
~/.config/Vencord/dist/vencordDesktopMain.jssocp ~/.config/Vencord/dist/vencordDesktopMain.js ~/.config/Vencord/dist/vencordDesktopMain.js.bak) or not, if you want to restore it later you can delete the file and start Vesktop to recreate it. - Inject the content of
vencordDesktopMain_sample.jsin your Vencord main file (usually located in~/.config/Vencord/dist/vencordDesktopMain.js):- Insert the entire content of
vencordDesktopMain_sample.jsjust before the line//# sourceURL=at the end of the file.
- Insert the entire content of
- Make a dir
vesktopCustomCommandsin your Vencord path (usually located in~/.config/Vencord/dist/) and put the filecustomCode.jsin it. - Make a dir
~/.vesktopCustomCommandsand put the filesmute.shanddeafen.shin it. - Add permissions to the scripts
mute.shanddeafen.sh:chmod +x ~/.vesktopCustomCommands/mute.sh chmod +x ~/.vesktopCustomCommands/deafen.sh - Put the
.configfile in~/.vesktopCustomCommandsand update thevencord_pathvariable with your Vencord path if needed. - Restart Vesktop to apply the changes.
- Configure a custom global shortcut in your system to call the scripts
mute.shanddeafen.shin~/.vesktopCustomCommands/folder.mute.shto mute yourself.~/.vesktopCustomCommands/mute.shdeafen.shto deafen yourself.~/.vesktopCustomCommands/deafen.sh
- Enjoy your new global shortcuts to mute and deafen yourself!
Uninstallation
Automatic uninstallation
Run this command in your terminal and follow the instructions:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/NitramO-YT/vesktopCustomCommands/refs/heads/main/uninstall.sh)"
During uninstallation, you'll be asked whether you want to remove EVERYTHING, including your settings (~/.vesktopCustomCommands/.config).
- Answer "y": all files and settings are removed.
- Answer "n": only program files are removed; your
.configis preserved.
If settings are removed, the auto-repatch service/timer and helper scripts are also removed. If you refuse automatic uninstallation, follow the manual uninstallation steps below (the same instructions are also echoed by the script).
Manual uninstallation
- Remove the custom global shortcuts in your system that call the scripts
mute.shanddeafen.shin~/.vesktopCustomCommands/folder. - Remove the
.configfile in~/.vesktopCustomCommands. - Remove the
~/.vesktopCustomCommandsfolder. - Remove the
customCode.jsfile in your Vencord path~/.config/Vencord/dist/vesktopCustomCommands/. - Remove the
vesktopCustomCommandsfolder in your Vencord path~/.config/Vencord/dist/. - Remove the injected code in your Vencord main file (usually located in
~/.config/Vencord/dist/vencordDesktopMain.js) or replace it with the backup you made if you did. (You can also delete the file and start Vesktop to recreate it). - Restart Vesktop to apply the changes.
Issues and improvements
If you have any issues or improvements to suggest, please open an issue!
Contributions
I know that this system is not perfect and that I have not respected all the standards and semantics, that's why I'm counting on those who would like to help me improve this system, issues and pull requests are open, and I am open to any constructive criticism!
Explanation of the main goal of this project
I was a user used to KDE Neon under X11 and so my Discord worked well, overall, and recently I switched to KDE Neon under Wayland and I discovered that Discord had a lot of problems on it, especially screen sharing was impossible for me, so looking to solve my problems with Discord, I discovered Vesktop and by extension Vencord, and I discovered all the problems it solved and even some that I already had under X11 (like the pure and simple absence of the possibility to share sound during a screen sharing), I installed it and everything was perfect, except for a small detail, the lack of support for Global Keyboard Shortcuts, the only possibility was the default Discord shortcuts (Ctrl + Shift + M and Ctrl + Shift + D) which only work if the window is active, so I started looking for shortcuts in Vesktop and I could see and read that the problem is known but the solution is still far from being found, especially on Wayland which seems to complicate the life of developers who are looking to make global keyboard shortcuts, so I thought I would give up on it, but like any
