Skip to content

feat: Toggle voice status using fifo pipe#609

Closed
PolisanTheEasyNick wants to merge 19 commits intoVencord:mainfrom
PolisanTheEasyNick:keybinds
Closed

feat: Toggle voice status using fifo pipe#609
PolisanTheEasyNick wants to merge 19 commits intoVencord:mainfrom
PolisanTheEasyNick:keybinds

Conversation

@PolisanTheEasyNick
Copy link
Copy Markdown
Contributor

@PolisanTheEasyNick PolisanTheEasyNick commented May 17, 2024

Note: try to use #326 first.
This PR adds temporarily implementing basic keybinding for toggling mute and deaf statuses.

How it works?

This PR creates pipe file at $XDG_RUNTIME_DIR/vesktop-ipc which listens for strings VCD_TOGGLE_SELF_MUTE and VCD_TOGGLE_SELF_DEAF and performs actions if this data is transfered to pipe.
So with this if anywhere in the system you execute echo "VCD_TOGGLE_SELF_MUTE" >> $XDG_RUNTIME_DIR/vesktop-ipc then it will toggle mute. echo "VCD_TOGGLE_SELF_DEAF" >> $XDG_RUNTIME_DIR/vesktop-ipc will toggle self deafness.

How we can use it?

For example, in KDE systems, we can add custom keybinds which will execute a given command with needed signal:
image
I think in other DEs there must be ways to do similar actions.
If it will be merged, I think we must write these instructions into README.
This solution is really temporary and in future we must move to some native solutions for keybindings.

@PolisanTheEasyNick PolisanTheEasyNick changed the title Added ability to toggle voice using proc signals feat: Toggle voice status using proc signals May 17, 2024
Comment thread src/renderer/index.ts Outdated
Comment thread src/main/keybinds.ts Outdated
@PolisanTheEasyNick PolisanTheEasyNick changed the title feat: Toggle voice status using proc signals feat: Toggle voice status using fifo pipe May 24, 2024
Comment thread src/main/screenShare.ts Outdated
Comment thread src/renderer/index.ts Outdated
Comment thread src/main/mainWindow.ts Outdated
Comment thread src/main/keybinds.ts Outdated
Comment thread src/main/keybinds.ts Outdated
Comment thread src/main/keybinds.ts Outdated
Comment thread src/main/keybinds.ts Outdated
Comment thread src/main/keybinds.ts Outdated
@Vendicated
Copy link
Copy Markdown
Member

this doesn't really work still. the first command works, but then runs into

Failed to mkfifo /run/user/1000/vesktop-ipc while initializing vesktop-ipc: Error: Command failed: mkfifo /run/user/1000/vesktop-ipc
mkfifo: cannot create fifo '/run/user/1000/vesktop-ipc': File exists

@PolisanTheEasyNick
Copy link
Copy Markdown
Contributor Author

Didn't have this issue, but now before creating a pipe file it checks whether it exists, if so removes the file and recreates. Also, it must now remove the file if Vesktop is closed.

@hollowstrawberry
Copy link
Copy Markdown

Works great for me.

@minchingtonak
Copy link
Copy Markdown

minchingtonak commented Aug 26, 2024

Hi there, thanks for creating this feature. I'm using it now and it works nicely. I did have to patch the implementation to allow non-wayland display servers though.

I'm curious, is there a reason the keybinds are only enabled on wayland? It seems to be working fine and I'm running X11.

@JoshIce
Copy link
Copy Markdown

JoshIce commented Sep 2, 2024

Hey just wanted to say this is working great! Hoping we can get this or some other solution merged into main soon!

@CookieUniverse
Copy link
Copy Markdown

I don't really know if its my problem but when run echo "VCD_TOGGLE_SELF_MUTE" >> $XDG_RUNTIME_DIR/vesktop-ipc it just hangs the console and nothing happens.
Using the latest Nobara Linux with wayland and nvidia drivers if that matters.
image

@PolisanTheEasyNick
Copy link
Copy Markdown
Contributor Author

I don't really know if its my problem but when run echo "VCD_TOGGLE_SELF_MUTE" >> $XDG_RUNTIME_DIR/vesktop-ipc it just hangs the console and nothing happens. Using the latest Nobara Linux with wayland and nvidia drivers if that matters.

Please show output of echo $XDG_RUNTIME_DIR and ls -la $XDG_RUNTIME_DIR

@CookieUniverse
Copy link
Copy Markdown

I don't really know if its my problem but when run echo "VCD_TOGGLE_SELF_MUTE" >> $XDG_RUNTIME_DIR/vesktop-ipc it just hangs the console and nothing happens. Using the latest Nobara Linux with wayland and nvidia drivers if that matters.

Please show output of echo $XDG_RUNTIME_DIR and ls -la $XDG_RUNTIME_DIR

image

@PolisanTheEasyNick
Copy link
Copy Markdown
Contributor Author

Looks like no problem with pipe creation.
Which terminal shell do you use? Is it bash?
Please answer in PM discord: ob3r0n for not spamming here with support topic

@CookieUniverse
Copy link
Copy Markdown

turns out my problem wasn't related to this. this works!

@ilobilo
Copy link
Copy Markdown

ilobilo commented Oct 6, 2024

Hi is this getting merged any time soon?

@PolisanTheEasyNick
Copy link
Copy Markdown
Contributor Author

Hi is this getting merged any time soon?

I don't believe so, this PR is desired for other users who needs that feature.

@ilobilo
Copy link
Copy Markdown

ilobilo commented Oct 6, 2024

do I need to build it myself to use it?

@minchingtonak
Copy link
Copy Markdown

do I need to build it myself to use it?

Yes. Use the instructions here, make sure to check out this branch right after cloning (git switch keybinds).

refurbishing added a commit to Equicord/Equibop that referenced this pull request Oct 14, 2024
Comment thread src/main/mainWindow.ts Outdated
@HateJoysticks
Copy link
Copy Markdown

I think I'm doing something wrong here, Can someone explain how to do it?

@ilobilo
Copy link
Copy Markdown

ilobilo commented Feb 11, 2025

could this branch be updated with main?

@vinivosh
Copy link
Copy Markdown

Just saying that this is working perfectly for my use case! I'm impressed, hope this gets merged some time.

fragtion added a commit to fragtion/Vesktop that referenced this pull request Jul 23, 2025
@mgabor3141
Copy link
Copy Markdown

Hi, I've resolved the conflicts and updated the branch with the changes from main.
See: mgabor3141#1 or PolisanTheEasyNick#2

I've also added MUTE and UNMUTE commands in addition to the TOGGLE_MUTE command.
See: mgabor3141/Vesktop@328710d (#2)

VirtCode added a commit to VirtCode/Vesktop that referenced this pull request Feb 3, 2026
contains changes from upstream Vencord#609

Co-authored-by: Oleh Polisan <polisanoleg@gmail.com>
Co-authored-by: Vendicated <vendicated@riseup.net>
@Vendicated
Copy link
Copy Markdown
Member

Superseded by #1238 which uses a unix socket server instead

@Vendicated Vendicated closed this Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants