diff options
author | Karel Kočí <cynerd@email.cz> | 2019-11-19 21:02:25 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2019-11-19 21:03:22 +0100 |
commit | e4e7f5b78ff8334a69cb15cfa56f9c6cbcaa08e5 (patch) | |
tree | 4fdd5be11a67ac71d8174a558f9d38b14dc2f946 /sys-apps | |
parent | a12e7c50b315c3d1160507dd2742c4387436dee7 (diff) | |
download | gentoo-personal-overlay-e4e7f5b78ff8334a69cb15cfa56f9c6cbcaa08e5.tar.gz gentoo-personal-overlay-e4e7f5b78ff8334a69cb15cfa56f9c6cbcaa08e5.tar.bz2 gentoo-personal-overlay-e4e7f5b78ff8334a69cb15cfa56f9c6cbcaa08e5.zip |
sys-apps/madcatz-mouse-restart: add hook to restart usb mouse
Diffstat (limited to 'sys-apps')
-rwxr-xr-x | sys-apps/madcatz-mouse-restart/files/madcatz-rat6 | 10 | ||||
-rw-r--r-- | sys-apps/madcatz-mouse-restart/madcatz-mouse-restart-1.0.ebuild | 18 |
2 files changed, 28 insertions, 0 deletions
diff --git a/sys-apps/madcatz-mouse-restart/files/madcatz-rat6 b/sys-apps/madcatz-mouse-restart/files/madcatz-rat6 new file mode 100755 index 0000000..3f5f94c --- /dev/null +++ b/sys-apps/madcatz-mouse-restart/files/madcatz-rat6 @@ -0,0 +1,10 @@ +#!/bin/sh + +if [ "$1" = "post" ] && [ "$2" = "suspend" ]; then + for device in /sys/bus/usb/devices/*; do + [ "$(cat "$device/idVendor")" = "12cf" ] || continue + [ "$(cat "$device/idProduct")" = "0c04" ] || continue + echo 0 > "$device/authorized" + echo 1 > "$device/authorized" + done +fi diff --git a/sys-apps/madcatz-mouse-restart/madcatz-mouse-restart-1.0.ebuild b/sys-apps/madcatz-mouse-restart/madcatz-mouse-restart-1.0.ebuild new file mode 100644 index 0000000..7bd86f1 --- /dev/null +++ b/sys-apps/madcatz-mouse-restart/madcatz-mouse-restart-1.0.ebuild @@ -0,0 +1,18 @@ +# Copyright 2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Fix to reload Mad Catz RAT 6+ on wakeup" + +LICENSE="GPL-3.0+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="sys-auth/elogind" +RDEPEND="${DEPEND}" + +src_install() { + exeinto /lib64/elogind/system-sleep + doexe "${FILESDIR}/madcatz-rat6" +} |