Initial commit.

This commit is contained in:
2018-10-02 20:14:20 +02:00
commit ab49ee4cee
8 changed files with 269 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
#!/bin/bash
MODE=$4
USER=$(ps aux | grep startkde | grep -v sddm | grep -v grep | awk '{print $1}')
export DISPLAY=:0
case $MODE in
00000001)
# Tabletmode ON
sudo -u $USER xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 0
sudo -u $USER xinput set-prop "TPPS/2 Elan TrackPoint" "Device Enabled" 0
sudo -u $USER /etc/acpi/thinkpad-autorotate.py &
sudo -u $USER /usr/bin/onboard &
;;
00000000)
# Tabletmode OFF
sudo -u $USER xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 1
sudo -u $USER xinput set-prop "TPPS/2 Elan TrackPoint" "Device Enabled" 1
pkill -f thinkpad-autorotate.py
pkill -f /usr/bin/onboard
sudo -u $USER /usr/local/bin/thinkpad-rotate.rb normal
;;
esac