diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-10-24 22:29:35 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-10-24 22:29:35 +0530 |
commit | 4f0a26b94993e4a910ab9dc54bb5c93ce2aa660d (patch) | |
tree | 6e7ed889e119b3aa9602cf4bb0a8b25fc6743412 /.scripts/virtual_mic.sh | |
parent | 2e3d99acd413c663c489312daadd3197fd558c15 (diff) |
not turning on laptop screen if lid is off upon login
Diffstat (limited to '.scripts/virtual_mic.sh')
-rwxr-xr-x | .scripts/virtual_mic.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/.scripts/virtual_mic.sh b/.scripts/virtual_mic.sh index a33382d..b5a6354 100755 --- a/.scripts/virtual_mic.sh +++ b/.scripts/virtual_mic.sh @@ -1,12 +1,15 @@ #!/bin/sh +default_source="$(pactl get-default-source)" +default_sink="$(pactl get-default-sink)" + # create virtual sinks pactl load-module module-null-sink sink_name=VirtualSpeaker pactl load-module module-null-sink media.class=Audio/Duplex sink_name=VirtualMicrophone # create loopbacks -pactl load-module module-loopback source="VirtualSpeaker.monitor" sink="$(pactl get-default-sink)" -pactl load-module module-loopback source="$(pactl get-default-source)" sink="VirtualMicrophone" +pactl load-module module-loopback source="VirtualSpeaker.monitor" sink="$default_sink" +pactl load-module module-loopback source="$default_source" sink="VirtualMicrophone" pactl load-module module-loopback source="VirtualSpeaker.monitor" sink="VirtualMicrophone" # set default mic |