Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion G213Colors.desktop
Original file line number Diff line number Diff line change
@@ -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
Expand Down
19 changes: 19 additions & 0 deletions be.jeroened.pkexec.g213colors.policy
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/software/polkit/policyconfig-1.dtd">
<policyconfig>

<action id="be.jeroened.pkexec.g213colors">
<message>Authentication is required to run G213 Colors</message>
<icon_name>g213colors</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/g213colors-gui</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>

</policyconfig>
11 changes: 11 additions & 0 deletions g213colors.openrc
Original file line number Diff line number Diff line change
@@ -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"
4 changes: 4 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -12,19 +13,22 @@ 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 :
rm /usr/bin/G213Colors.py
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
rm /usr/share/icons/hicolor/48x48/apps/g213colors.png
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