clean tablet script

This commit is contained in:
wassname
2019-03-25 10:57:27 +08:00
parent c27ce48fb9
commit 0db1eb8bc0
2 changed files with 3 additions and 17 deletions
+3 -2
View File
@@ -13,8 +13,9 @@ Status: Working!
This repo is forked from https://github.com/ffejery/thinkpad-l380-yoga-scripts with edits for the x380. Differences are:
- we don't need to disable the keyboard and buttons depress
- there seems to be no hotkey for tablet mode, so we need a workaround
- we don't need to disable the keyboard as the buttons depress via hardware
- there seems to be no hotkey for tablet mode, so we need a workaround (I use acpi listen)
- there seems to be a bug where xinput can't enable the touchpad once it's disabled, so we need another workaround
For more tweaks for Xubuntu on a Thinkpad x380 yoga see [this gist](https://gist.github.com/wassname/4aec086afe518dfbceaf00577442c432)
-15
View File
@@ -2,12 +2,6 @@
acpi_listen | while IFS= read -r ACPI_EVENT;
do
case "$ACPI_EVENT" in
"ibm/hotkey IBM0068:00 00000080 0000500c")
echo "Stylus removed"
;;
"ibm/hotkey IBM0068:00 00000080 0000500b")
echo "Stylus replaced"
;;
"video/tabletmode TBLT 0000008A 00000001")
xinput disable "ETPS/2 Elantech TrackPoint"
synclient TouchpadOff=1
@@ -24,13 +18,4 @@ do
echo "Unknown event: '$ACPI_EVENT'"
;;
esac
if [ "$line" = "jack/headphone HEADPHONE plug" ]
then
notify-send "headphones connected"
sleep 1.5 && killall notify-osd
elif [ "$line" = "jack/headphone HEADPHONE unplug" ]
then
notify-send "headphones disconnected"
sleep 1.5 && killall notify-osd
fi
done