toggle voice-changer

This commit is contained in:
Daniel Lovbrotte Olsen 2023-09-24 18:19:16 +02:00
parent 760228bcc6
commit 8fa457dc8d
1 changed files with 17 additions and 0 deletions

View File

@ -87,6 +87,23 @@ in
"${modifier}+Shift+U" = "exec $HOME/.config/nixpkgs/nix-dotfiles/scripts/dmenuunicode"; "${modifier}+Shift+U" = "exec $HOME/.config/nixpkgs/nix-dotfiles/scripts/dmenuunicode";
"${modifier}+Shift+s" = "exec $HOME/.config/nixpkgs/nix-dotfiles/scripts/dmenuaudio"; "${modifier}+Shift+s" = "exec $HOME/.config/nixpkgs/nix-dotfiles/scripts/dmenuaudio";
"${modifier}+Shift+v" = "exec ${pkgs.writers.writeBash "switch_audio" ''
if pw-link -l | grep "^VirtualMic:input_FL" -A 2 | grep FilteredMic; then
${pkgs.pipewire}/bin/pw-link -d "FilteredMic:capture_MONO" "VirtualMic:input_FL"
${pkgs.pipewire}/bin/pw-link -d "FilteredMic:capture_MONO" "VirtualMic:input_FR"
${pkgs.pipewire}/bin/pw-link "VoiceChanger:monitor_FL" "VirtualMic:input_FL"
${pkgs.pipewire}/bin/pw-link "VoiceChanger:monitor_FR" "VirtualMic:input_FR"
${pkgs.pipewire}/bin/pw-link "VoiceChanger:monitor_FL" "VirtualHeadset:playback_FL"
${pkgs.pipewire}/bin/pw-link "VoiceChanger:monitor_FR" "VirtualHeadset:playback_FR"
else
${pkgs.pipewire}/bin/pw-link "FilteredMic:capture_MONO" "VirtualMic:input_FL"
${pkgs.pipewire}/bin/pw-link "FilteredMic:capture_MONO" "VirtualMic:input_FR"
${pkgs.pipewire}/bin/pw-link -d "VoiceChanger:monitor_FL" "VirtualMic:input_FL"
${pkgs.pipewire}/bin/pw-link -d "VoiceChanger:monitor_FR" "VirtualMic:input_FR"
${pkgs.pipewire}/bin/pw-link -d "VoiceChanger:monitor_FL" "VirtualHeadset:playback_FL"
${pkgs.pipewire}/bin/pw-link -d "VoiceChanger:monitor_FR" "VirtualHeadset:playback_FR"
fi
''}";
"${modifier}+d" = "exec ${dmenu}"; "${modifier}+d" = "exec ${dmenu}";