Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions tablet/mouse-toggle.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Simple script to toggle on/off the ThinkPad Yoga's Trackpoint and Clickpad
# and kill/launch. To be binded with switches when switching between tablet/laptop
# modes.
Expand All @@ -10,14 +10,13 @@

case "$1" in
off)
xinput --set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 0
xinput --set-prop "TPPS/2 IBM TrackPoint" "Device Enabled" 0
xinput --set-prop "$(xinput list --name-only | grep -i 'TouchPad')" "Device Enabled" 0
xinput --set-prop "$(xinput list --name-only | grep -i 'TrackPoint')" "Device Enabled" 0
sudo -b -u \#1000 onboard
;;
on)
xinput --set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 1
xinput --set-prop "TPPS/2 IBM TrackPoint" "Device Enabled" 1
xinput --set-prop "$(xinput list --name-only | grep -i 'TouchPad')" "Device Enabled" 1
xinput --set-prop "$(xinput list --name-only | grep -i 'TrackPoint')" "Device Enabled" 1
killall onboard
;;
esac