Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Toggle voice status using fifo pipe #609

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

PolisanTheEasyNick
Copy link
Contributor

@PolisanTheEasyNick PolisanTheEasyNick commented May 17, 2024

This PR adds not bad way for 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
src/renderer/index.ts Outdated Show resolved Hide resolved
src/main/keybinds.ts Outdated Show resolved Hide resolved
@PolisanTheEasyNick PolisanTheEasyNick changed the title feat: Toggle voice status using proc signals feat: Toggle voice status using fifo pipe May 24, 2024
src/main/screenShare.ts Outdated Show resolved Hide resolved
src/renderer/index.ts Outdated Show resolved Hide resolved
src/main/mainWindow.ts Outdated Show resolved Hide resolved
src/main/keybinds.ts Outdated Show resolved Hide resolved
src/main/keybinds.ts Outdated Show resolved Hide resolved
src/main/keybinds.ts Outdated Show resolved Hide resolved
src/main/keybinds.ts Outdated Show resolved Hide resolved
src/main/keybinds.ts Outdated Show resolved Hide resolved
@Vendicated
Copy link
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
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

Works great for me.

@minchingtonak
Copy link

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

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

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
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

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
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

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

@ilobilo
Copy link

ilobilo commented Oct 6, 2024

Hi is this getting merged any time soon?

@PolisanTheEasyNick
Copy link
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

ilobilo commented Oct 6, 2024

do I need to build it myself to use it?

@minchingtonak
Copy link

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).

verysillycat added a commit to Equicord/Equibop that referenced this pull request Oct 14, 2024
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.

7 participants