Add udev rules to update status bar plugging in / unplugging charger

master
Miles Alan 5 years ago
parent 0801bb1adb
commit 579503ee1f
  1. 5
      Makefile
  2. 2
      configs/udev/50-sxmo.rules

@ -28,7 +28,10 @@ install: programs/sxmo_setpineled programs/sxmo_setpinebacklight programs/sxmo_s
cp configs/alsa/alsa_sxmo_enable_dmix.conf $(PREFIX)/etc/alsa/conf.d/
mkdir -p $(PREFIX)/etc/polkit-1/rules.d
cp configs/polkit/00-sxmo.rules $(PREFIX)/etc/polkit-1/rules.d/
cp configs/polkit/*.rules $(PREFIX)/etc/polkit-1/rules.d/
mkdir -p $(PREFIX)/etc/udev/rules.d
cp configs/udev/*.rules $(PREFIX)/etc/udev/rules.d/
mkdir -p $(PREFIX)/usr/bin
cp scripts/*/* $(PREFIX)/usr/bin

@ -0,0 +1,2 @@
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="/usr/bin/sxmo_statusbarupdate.sh"
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="0", RUN+="/usr/bin/sxmo_statusbarupdate.sh"
Loading…
Cancel
Save