Skip to content

Commit

Permalink
feat(audio): add boar headphones via DP LG Screen
Browse files Browse the repository at this point in the history
  • Loading branch information
workflow committed Oct 16, 2024
1 parent d0a4fba commit ec74d8b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions home/i3status-rust.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
}: let
soundBlockMappings = {
"boar" = {
"alsa_output.pci-0000_51_00.1.hdmi-stereo" = "";
"alsa_output.pci-0000_00_1f.3.analog-stereo" = "";
"alsa_output.pci-0000_00_1f.3.analog-stereo.2" = "";
"alsa_output.usb-Lenovo_ThinkPad_Thunderbolt_3_Dock_USB_Audio_000000000000-00.analog-stereo" = "";
Expand Down
14 changes: 8 additions & 6 deletions home/scripts/scripts/sound-switcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,13 @@ function d {
}

function localspeaker {
LOCALSPEAKER1="alsa_output.pci-0000_00_1f.3-platform-sof_sdw.HiFi___ucm0003.hw_sofsoundwire_2__sink"
LOCALSPEAKER2="alsa_output.pci-0000_00_1f.3-platform-sof_sdw.HiFi___ucm0005.hw_sofsoundwire_2__sink"
LOCALSPEAKER3="alsa_output.pci-0000_00_1f.3-platform-sof_sdw.HiFi___ucm0007.hw_sofsoundwire_2__sink"
LOCALSPEAKER4="alsa_output.pci-0000_00_1f.3-platform-sof_sdw.HiFi__hw_sofsoundwire_2__sink"
LOCALSPEAKER5="alsa_output.pci-0000_00_1f.3.analog-stereo"
LOCALSPEAKER6="alsa_output.pci-0000_00_1f.3.analog-stereo.2"
LOCALSPEAKER1="alsa_output.pci-0000_51_00.1.hdmi-stereo"
LOCALSPEAKER2="alsa_output.pci-0000_00_1f.3-platform-sof_sdw.HiFi___ucm0003.hw_sofsoundwire_2__sink"
LOCALSPEAKER3="alsa_output.pci-0000_00_1f.3-platform-sof_sdw.HiFi___ucm0005.hw_sofsoundwire_2__sink"
LOCALSPEAKER4="alsa_output.pci-0000_00_1f.3-platform-sof_sdw.HiFi___ucm0007.hw_sofsoundwire_2__sink"
LOCALSPEAKER5="alsa_output.pci-0000_00_1f.3-platform-sof_sdw.HiFi__hw_sofsoundwire_2__sink"
LOCALSPEAKER6="alsa_output.pci-0000_00_1f.3.analog-stereo"
LOCALSPEAKER7="alsa_output.pci-0000_00_1f.3.analog-stereo.2"
SINKS=$(pactl list sinks)

case $SINKS in
Expand All @@ -79,6 +80,7 @@ function localspeaker {
*"$LOCALSPEAKER4"*) LOCALSPEAKER=$LOCALSPEAKER4 ;;
*"$LOCALSPEAKER5"*) LOCALSPEAKER=$LOCALSPEAKER5 ;;
*"$LOCALSPEAKER6"*) LOCALSPEAKER=$LOCALSPEAKER6 ;;
*"$LOCALSPEAKER7"*) LOCALSPEAKER=$LOCALSPEAKER7 ;;
*) echo "Local speaker not found" ;;
esac

Expand Down

0 comments on commit ec74d8b

Please sign in to comment.