feat(scripts): add config

This commit is contained in:
2025-11-08 19:34:01 -05:00
parent a7319f7d7f
commit d9be0f4e18
44 changed files with 2746 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
#!/bin/bash
# Get device id of Synaptics TrackPad
id=$(xinput list --id-only 'SynPS/2 Synaptics TouchPad')
# Enables TrackPad
trackpadEnable() {
xinput set-prop $id "Device Enabled" 1
exit
}
# Disables TrackPad
trackpadDisable() {
xinput set-prop $id "Device Enabled" 0
exit
}
# Checks for disable flag
if [ ! -z $1 ] && [ $1 == '-d' ]; then
echo flag worked
trackpadDisable
fi
# Convert to an arry
read -a trackPadState <<< "$(xinput --list-props $id | grep "Device Enabled")"
devEnabled=${devString_array[3]}
# Flip the state of the TrackPad
if [ ${trackPadState[3]} -eq 1 ]; then
trackpadDisable
else
trackpadEnable
fi