From 579503ee1fd1eb15848eb285fcb3fd78f2a37a94 Mon Sep 17 00:00:00 2001 From: Miles Alan Date: Sun, 12 Jul 2020 19:24:07 -0500 Subject: [PATCH] Add udev rules to update status bar plugging in / unplugging charger --- Makefile | 5 ++++- configs/udev/50-sxmo.rules | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 configs/udev/50-sxmo.rules diff --git a/Makefile b/Makefile index 884fb01..3e0e9d1 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/configs/udev/50-sxmo.rules b/configs/udev/50-sxmo.rules new file mode 100644 index 0000000..9b4455a --- /dev/null +++ b/configs/udev/50-sxmo.rules @@ -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"