1
0
mirror of https://github.com/balkian/dotfiles.git synced 2024-11-21 11:42:28 +00:00

Added rules to default to plugable's audio card

This commit is contained in:
J.Fernando Sánchez 2013-04-05 13:11:38 +02:00
parent be555f96c5
commit aca2501b9c
2 changed files with 3 additions and 1 deletions

2
bin

@ -1 +1 @@
Subproject commit 74f36c4a4d5003a7b952ad4f42da3376d96e3902 Subproject commit 4c6e834e03d0de2a1ddb6565f313e1f5435340b2

View File

@ -0,0 +1,2 @@
ACTION=="add", SUBSYSTEMS=="usb", ENV{ID_VENDOR_ID}=="0d8c", ENV{ID_MODEL_ID}=="0105", RUN+="/usr/bin/daemon -o /tmp/out.log -- /bin/su jfernando -c 'sleep 1 && /usr/bin/pacmd set-default-source alsa_input.usb-C-Media_Electronics_Inc._USB_Multimedia_Audio_Device-00-Device.analog-stereo && /usr/bin/pacmd set-default-sink alsa_output.usb-C-Media_Electronics_Inc._USB_Multimedia_Audio_Device-00-Device.analog-stereo && killall xfce4-volumed && DISPLAY=:0.0 xfconf-query -v -c xfce4-mixer -p /active-card -s PlaybackCM108AudioControllerAnalogStereoPulseAudioMixer && sleep 1 && DISPLAY=:0.0 xfce4-volumed && env && echo done'"
ACTION=="remove", SUBSYSTEMS=="usb", ENV{ID_VENDOR_ID}=="0d8c", ENV{ID_MODEL_ID}=="0105", RUN+="/usr/bin/daemon -o /tmp/out.log -- /bin/su jfernando -c 'sleep 1 && echo Unplugging && /usr/bin/pacmd set-default-source alsa_input.pci-0000_00_1b.0.analog-stereo && /usr/bin/pacmd set-default-sink alsa_output.pci-0000_00_1b.0.analog-stereo && killall xfce4-volumed && DISPLAY=:0.0 xfconf-query -v -c xfce4-mixer -p /active-card -s BuiltinAudioAnalogStereo && sleep 1 && DISPLAY=:0.0 xfce4-volumed && env && echo Unplugged'"