HokieGeek / snotify

Displays to the user when events occur
0 stars 0 forks source link

Bluetooth state #6

Closed HokieGeek closed 9 years ago

HokieGeek commented 9 years ago

Trigger fired when Bluetooth is either enabled or disabled

I think this can be a udev rule?

SUBSYSTEM=="rfkill", ATTR{type}=="bluetooth", ATTR{state}=="0", RUN+="/usr/local/bin/system-notifier --trigger='bluetooth' 0
SUBSYSTEM=="rfkill", ATTR{type}=="bluetooth", ATTR{state}=="1", RUN+="/usr/local/bin/system-notifier --trigger='bluetooth' 1
HokieGeek commented 9 years ago

OSD: Display the Bluetooth logo when Bluetooth is enabled

HokieGeek commented 9 years ago

Try this, instead

SUBSYSTEM=="rfkill", ATTR{type}=="bluetooth", ATTR{state}=="0", RUN+="/usr/bin/hgnotify/bluetoothstate-listener disabled"
SUBSYSTEM=="rfkill", ATTR{type}=="bluetooth", ATTR{state}=="1", RUN+="/usr/bin/hgnotify/bluetoothstate-listener enabled"
HokieGeek commented 9 years ago

Got the OSD done, just need to try out the code that installs the udev rule (and then test that the rule works!)

The udev rule will need to be created upon installation.