shawaj / HiTide

TIDAL Installer for Raspberry Pi OS
GNU General Public License v2.0
96 stars 22 forks source link

USB hotplug #18

Open apokalyps1 opened 2 years ago

apokalyps1 commented 2 years ago

is it possible to have it change from usb dac to the pi's built in 3.5mm jack automatically at the moment i have to run systemctl restart in order for it to switch when i unplug my dac

apokalyps1 commented 2 years ago

is there an arguement for restart in the .system file such as on-lose-usb or something similar that might restart it when it loses usb connection or anyway to set it to output out of both at the same time?

wgorski commented 1 year ago

This can be achieved using udev rules. Basically, you can run a script whenever a usb device connects and when it's disconnected