dot-files/scripts/toggle_touchpad
Bruno BELANYI 13e52c1670 [UPDATE][SHELL] Notify on touchpad toggle
A low priority notification is displayed when enabling/disbling the
touchpad with i3's key-binding and/or te script.
2019-10-18 22:17:20 +02:00

14 lines
333 B
Bash
Executable file

#! /bin/sh
# Device id according to xinput list
device=11
state=$(xinput list-props "$device" | grep "Device Enabled" | grep -o "[01]$")
if [ "$state" == "1" ];then
xinput --disable "$device"
notify-send -u low "Toggled touchpad (disabled)"
else
xinput --enable "$device"
notify-send -u low "Toggled touchpad (enabled)"
fi