forked from tobecci/dotfiles.scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreload_touchpad.sh
executable file
·26 lines (19 loc) · 966 Bytes
/
reload_touchpad.sh
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
#!/bin/bash
password=$(cat /home/tobecci/.scripts/password.txt)
reload_touchpad(){
/usr/bin/killall --quiet libinput-gestures
/usr/bin/libinput-gestures-setup stop > /dev/null 2>&1
echo $password | /usr/bin/sudo --stdin /usr/bin/sudo --stdin /sbin/modprobe -r psmouse; /usr/bin/sudo --stdin /sbin/modprobe psmouse;
#echo $password | /usr/bin/sudo --stdin /sbin/modprobe -r i2c_i801; /usr/bin/sudo --stdin /sbin/modprobe i2c_i801;
/usr/bin/libinput-gestures-setup restart > /dev/null 2>&1
/usr/bin/libinput-gestures-setup start > /dev/null 2>&1 &
}
/usr/bin/redshift -O 1000 > /dev/null 2>&1 &
# send_notification "reloading touchpad...."
# /usr/bin/notify-send 'reload touchpad script' "reloading touchpad......"
reload_touchpad
/usr/bin/redshift -x > /dev/null 2>&1
# disable middle click
/usr/bin/xinput set-button-map 10 1 0 3 4 5 6 7
# send_notification "done reloading"
# /usr/bin/notify-send 'reload touchpad script' "completed"