mirror of
https://github.com/wassname/thinkpad-x380-yoga-scripts.git
synced 2026-09-09 11:38:34 +08:00
clean tablet script
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user