Files
AeroSway/scripts/touchpad_toggle

13 lines
393 B
Plaintext
Raw Permalink Normal View History

2025-03-25 01:47:41 +03:00
#!/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