dotfiles

Configuration for the software I use.
git clone https://git.sr.ht/~jbauer/dotfiles
Log | Files | Refs | README | LICENSE

commit 7a8cf09769ee8a8b921669b3c9628e9b3a9e048a
parent a523e0163ff5a4f654c547778ba107cf1b412c7e
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Sat, 20 Jun 2020 21:00:39 -0400

Create script to toggle touchpad

Diffstat:
A.local/bin/toggle-touchpad.sh | 15+++++++++++++++
1 file changed, 15 insertions(+), 0 deletions(-)

diff --git a/.local/bin/toggle-touchpad.sh b/.local/bin/toggle-touchpad.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Arbitrary but unique message id +msgId="901230" + +id=$(xinput list | grep TouchPad | cut -d'=' -f2 | awk '{print $1}') +state=$(xinput list-props "$id" | grep 'Device Enabled' | awk '{print $4}') + +if [ "$state" -eq 1 ]; then + xinput disable $id + dunstify -u low -i touchpad-disabled-symbolic -r "$msgId" "Touchpad Disabled" +else + xinput enable $id + dunstify -u low -i touchpad-enabled-symbolic -r "$msgId" "Touchpad Enabled" +fi