Replies: 1 comment
-
|
For windows I came up with this, requires svcl.exe. $last_hsvol = 64
$battery_warned = $false
while ($true){
Start-Sleep -Seconds 0.15
$jsono = ./headsetcontrol.exe -o json
$hs = ConvertFrom-Json "$jsono"
$hsvol = $hs.devices[0].chatmix
if ( $last_hsvol -eq $hsvol ) {
continue
}
$last_hsvol = $hsvol
$vol = $hsvol / 128 * 100
./svcl.exe /SetVolume AllAppVolume $vol
./svcl.exe /SetVolume "discord.exe" 100
if (( $hs.devices[0].battery.level -eq 25 ) -and ( -not $battery_warned )) {
New-BurntToastNotification -Text "Headset battery low!"
$battery_warned = $true
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I always have a virtual sink for all-audio except voice-audio. With this script you can control the all-audio/game-chat volume.
Find your headset name on the output of
pactl listand extend this command with it:pactl load-module module-remap-sink sink_name=Headset master=Set the new virtual sink as the default and set the real headset on your voice app as output.
Save this and execute it on every start, same with the command above. Or add the command above in the script.
https://gist.github.com/Nama/8ffc4efea3f91e868a2ded1eb31fda00
You can't use anything else to control the volume, this script will override it64if the headset is turned off with my SS Arctis Nova 7$last_hsvolto that value to avoid the script controlling your other devicespactlcommand instead ofwpctl, sincewpctldoesn't accepts sink namesBeta Was this translation helpful? Give feedback.
All reactions