1
0
mirror of https://github.com/balkian/dotfiles.git synced 2024-11-14 16:52:29 +00:00
dotfiles/not_dots/99-plugable.rules
2013-04-05 13:11:38 +02:00

3 lines
1.1 KiB
Plaintext

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'"