mirror of
https://github.com/wassname/thinkpad-x380-yoga-scripts.git
synced 2026-09-10 12:44:13 +08:00
misc
This commit is contained in:
@@ -31,6 +31,9 @@ For more tweaks for Xubuntu on a Thinkpad x380 yoga see [this gist](https://gist
|
||||
git clone https://github.com/wassname/thinkpad-x380-yoga-scripts /opt/thinkpad-x380-yoga-scripts
|
||||
|
||||
sudo cp /opt/thinkpad-x380-yoga-scripts/systemd/* /etc/systemd/system/
|
||||
sudo systemctl enable yoga-tablet@${USER}.service
|
||||
sudo systemctl start yoga-tablet@${USER}.service
|
||||
sudo systemctl status yoga-tablet@${USER}.service
|
||||
|
||||
sudo systemctl enable wacom-proximity@${USER}.service
|
||||
sudo systemctl start wacom-proximity@${USER}.service
|
||||
@@ -46,9 +49,6 @@ sudo systemctl status yoga-rotate@${USER}.service
|
||||
#sudo systemctl start yoga-backlight.service
|
||||
#sudo systemctl status yoga-backlight.service
|
||||
|
||||
sudo systemctl enable yoga-tablet.service
|
||||
sudo systemctl start yoga-tablet.service
|
||||
sudo systemctl status yoga-tablet.service
|
||||
```
|
||||
|
||||
# Scripts should fix:
|
||||
|
||||
@@ -3,7 +3,6 @@ Description=[ThinkPad Yoga] Wacom digitizer proximity detection
|
||||
Requires=display-manager.service
|
||||
After=display-manager.service
|
||||
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/bin/bash /opt/thinkpad-x380-yoga-scripts/wacom/thinkpad-yoga-prox.sh
|
||||
|
||||
@@ -4,9 +4,11 @@ Requires=display-manager.service
|
||||
After=display-manager.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/bash /opt/thinkpad-x380-yoga-scripts/tablet/tablet_monitor.sh
|
||||
KillMode=process
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/env bash /opt/thinkpad-x380-yoga-scripts/tablet/tablet_monitor.sh
|
||||
KillMode=process
|
||||
User=%i
|
||||
Environment="DISPLAY=:0" "XAUTHORITY=/home/%i/.Xauthority"
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -4,25 +4,25 @@ while true ; do
|
||||
read ACPI_EVENT
|
||||
case "$ACPI_EVENT" in
|
||||
"ibm/hotkey IBM0068:00 00000080 0000500c")
|
||||
echo "Stylus removed"
|
||||
echo "Stylus removed"
|
||||
;;
|
||||
"ibm/hotkey IBM0068:00 00000080 0000500b")
|
||||
echo "Stylus replaced"
|
||||
echo "Stylus replaced"
|
||||
;;
|
||||
"video/tabletmode TBLT 0000008A 00000001")
|
||||
xinput disable "ETPS/2 Elantech TrackPoint"
|
||||
synclient TouchpadOff=1
|
||||
nohup onboard >/dev/null 2>&1 &
|
||||
xinput disable "ETPS/2 Elantech TrackPoint"
|
||||
synclient TouchpadOff=1
|
||||
nohup onboard >/dev/null 2>&1 &
|
||||
echo "Tablet mode"
|
||||
;;
|
||||
"video/tabletmode TBLT 0000008A 00000000")
|
||||
xinput enable "ETPS/2 Elantech TrackPoint"
|
||||
synclient TouchpadOff=0
|
||||
killall onboard
|
||||
echo "Normal mode"
|
||||
xinput enable "ETPS/2 Elantech TrackPoint"
|
||||
synclient TouchpadOff=0
|
||||
killall onboard
|
||||
echo "Normal mode"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown event: '$ACPI_EVENT'"
|
||||
echo "Unknown event: '$ACPI_EVENT'"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user