1
0
mirror of https://github.com/balkian/dotfiles.git synced 2024-11-23 12:42:29 +00:00
dotfiles/not_dots/99-plugable.rules

3 lines
1.1 KiB
Plaintext
Raw Normal View History

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