diff --git a/G213Colors.desktop b/G213Colors.desktop index 916ae5c..36b6836 100755 --- a/G213Colors.desktop +++ b/G213Colors.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Name=G213 Colors -Exec=gksudo g213colors-gui +Exec=pkexec g213colors-gui Comment=A gui to change the key colors on a Logitech G213 Prodigy Gaming Keyboard Icon=g213colors Type=Application diff --git a/be.jeroened.pkexec.g213colors.policy b/be.jeroened.pkexec.g213colors.policy new file mode 100644 index 0000000..fe10cab --- /dev/null +++ b/be.jeroened.pkexec.g213colors.policy @@ -0,0 +1,19 @@ + + + + + + Authentication is required to run G213 Colors + g213colors + + auth_admin + auth_admin + auth_admin + + /usr/bin/g213colors-gui + true + + + \ No newline at end of file diff --git a/g213colors.openrc b/g213colors.openrc new file mode 100644 index 0000000..e59a513 --- /dev/null +++ b/g213colors.openrc @@ -0,0 +1,11 @@ +#!/sbin/openrc-run + +# https://github.com/goose121/initify systemd to openrc conversion perl script. +#opernrc service unit for g213colors + +command=/usr/bin/g213colors-gui +command_args="-t" +pidfile= + +name="g213colors" +description="Start G213Colors profile" diff --git a/makefile b/makefile index 393311f..6a1d22e 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 g213colors.openrc /etc/init.d/g213colors 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 @@ -12,6 +13,7 @@ install : cp icons/G213Colors-128.png /usr/share/icons/hicolor/128x128/apps/g213colors.png cp icons/G213Colors-192.png /usr/share/icons/hicolor/192x192/apps/g213colors.png cp G213Colors.desktop /usr/share/applications/g213colors.desktop + cp be.jeroened.pkexec.g213colors.policy /usr/share/polkit-1/actions/ gtk-update-icon-cache -q /usr/share/icons/hicolor/ systemctl daemon-reload uninstall : @@ -19,6 +21,7 @@ uninstall : rm /usr/bin/g213colors-gui rm /etc/G213Colors.conf rm /etc/systemd/system/g213colors.service + rm /etc/init.d/g213colors rm /usr/share/icons/hicolor/16x16/apps/g213colors.png rm /usr/share/icons/hicolor/24x24/apps/g213colors.png rm /usr/share/icons/hicolor/32x32/apps/g213colors.png @@ -26,5 +29,6 @@ uninstall : rm /usr/share/icons/hicolor/128x128/apps/g213colors.png rm /usr/share/icons/hicolor/192x192/apps/g213colors.png rm /usr/share/applications/g213colors.desktop + rm /usr/share/polkit-1/actions/be.jeroened.pkexec.g213colors.policy gtk-update-icon-cache -q /usr/share/icons/hicolor/ systemctl daemon-reload