Skip to content

Instantly share code, notes, and snippets.

@haliphax
Last active February 28, 2024 18:28
Show Gist options
  • Save haliphax/19e5b53dae4a7f3fd3c3 to your computer and use it in GitHub Desktop.
Save haliphax/19e5b53dae4a7f3fd3c3 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
VERB=enable
KEYBOARD_ID=12
TOUCHPAD_ID=13
[ -z "$(xinput list-props 13 | grep -e 'Device Enabled.*:.*0')" ] && VERB=disable
xinput $VERB $KEYBOARD_ID
xinput $VERB $TOUCHPAD_ID
if [ "$VERB" == "disable" ]; then
xrandr --output eDP1 --mode 1360x768
onboard &
else
xrandr --output eDP1 --mode 1920x1080
killall onboard
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment