fixed bug in toggle_touchpad

toggle_touchpad was using a static id instead of the dynamic one
readme extended
This commit is contained in:
Tobias Kessels
2017-08-13 01:26:53 +02:00
parent 4cf6e249b2
commit c96617dbce
2 changed files with 10 additions and 2 deletions

View File

@@ -1,2 +1,10 @@
# gists # gists
uploadtest
##chechsqlite.py
test sqliteDBs for consistency and passwords
##sort.py
move/sort files in current dir to subfolder named after mime-type
##toggle_touchpad
toggle touchpad on notebook on and off via xinput

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
touchpad_id=$(xinput list | grep -i touch | grep -Po '(?<=id=)\d+') touchpad_id=$(xinput list | grep -i touch | grep -Po '(?<=id=)\d+')
if (xinput list-props 14 | grep "Device Enabled" | grep -Po '\d$' | grep -q "1"); then if (xinput list-props ${touchpad_id} | grep "Device Enabled" | grep -Po '\d$' | grep -q "1"); then
xinput disable "${touchpad_id}" xinput disable "${touchpad_id}"
else else
xinput enable "${touchpad_id}" xinput enable "${touchpad_id}"