Files
AeroSway/scripts/touchpad_toggle
2025-08-28 13:28:52 +03:00

13 lines
393 B
Bash
Executable File

#!/bin/bash
touchpad_config=$(swaymsg -t get_inputs | jq -c '.[] | select(.type == "touchpad")')
dwt_status=$(echo "$touchpad_config" | jq -r '.libinput.dwt')
if [ "$dwt_status" == "enabled" ]; then
swaymsg input type:touchpad dwt disabled
swaymsg input type:touchpad events disabled
else
swaymsg input type:touchpad dwt enabled
swaymsg input type:touchpad events enabled
fi