forked from autokey/autokey
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautokey-common.prerm
More file actions
29 lines (25 loc) · 899 Bytes
/
Copy pathautokey-common.prerm
File metadata and controls
29 lines (25 loc) · 899 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
case "$1" in
remove|deconfigure)
if [ "$(logname)" != "root" ]; then
# Remove the user from the "input" users group
if [ -e /dev/uinput ]; then
usermod -r -G "input" "$(logname)"
fi
# If Gnome is present, remove the Gnome Shell extension
gnome-extensions &>/dev/null
if [ $? -ne 127 ]; then
su -c 'gnome-extensions uninstall "autokey-gnome-extension@autokey"' $(logname)
rm -fr "/home/$(logname)/.local/share/gnome-shell/extensions/autokey-gnome-extension@autokey"
fi
fi
# Remove non-root write access to /dev/uinput
if [ -e /dev/uinput ]; then
rm -f '/etc/udev/rules.d/10-autokey.rules'
/usr/bin/udevadm control --reload
/usr/bin/udevadm trigger --sysname-match='/devices/virtual/misc/uinput'
fi
;;
esac
#DEBHELPER#
exit 0