From 4d3de75d905c98d8e5c9b90f18538fca8e58d4f2 Mon Sep 17 00:00:00 2001 From: Itay Grudev Date: Fri, 19 Jun 2020 06:31:04 +0100 Subject: [PATCH 1/3] Restore the device state when it's plugged in --- 99-g213Colors.rules | 1 + makefile | 1 + 2 files changed, 2 insertions(+) create mode 100644 99-g213Colors.rules diff --git a/99-g213Colors.rules b/99-g213Colors.rules new file mode 100644 index 0000000..d15f20a --- /dev/null +++ b/99-g213Colors.rules @@ -0,0 +1 @@ +SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c336", ACTION=="add", RUN+="/bin/systemctl restart g213colors.service" diff --git a/makefile b/makefile index 393311f..91301bb 100644 --- a/makefile +++ b/makefile @@ -3,6 +3,7 @@ install : cp main.py /usr/bin/g213colors-gui cp default.conf /etc/G213Colors.conf cp g213colors.service /etc/systemd/system/g213colors.service + cp 99-g213colors.rules /etc/udev/rules.d/99-g213colors.rules chmod +x /usr/bin/G213Colors.py chmod +x /usr/bin/g213colors-gui cp icons/G213Colors-16.png /usr/share/icons/hicolor/16x16/apps/g213colors.png From ffcf2e2097997d1fd3f3e5ff3f7d04819b1d2ce4 Mon Sep 17 00:00:00 2001 From: Itay Grudev Date: Fri, 19 Jun 2020 06:33:27 +0100 Subject: [PATCH 2/3] Renamed rules file --- 99-g213Colors.rules => 99-g213colors.rules | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename 99-g213Colors.rules => 99-g213colors.rules (100%) diff --git a/99-g213Colors.rules b/99-g213colors.rules similarity index 100% rename from 99-g213Colors.rules rename to 99-g213colors.rules From 05f698e9a40d3d187081d54f17b41c77123bbfc5 Mon Sep 17 00:00:00 2001 From: Itay Grudev Date: Wed, 9 Sep 2020 13:29:20 +0100 Subject: [PATCH 3/3] Bug Fix: Python2 is no longer distributed by default and not even linked on some distros. --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 060f581..d911a42 100644 --- a/main.py +++ b/main.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import G213Colors