Handy dot files with sensible bindings and settings
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

22 lines
577 B

#!/bin/bash
HYPRLAND_DEVICE="asue1209:00-04f3:319f-touchpad"
notif="$HOME/.config/swaync/images/bell.png"
XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/run/user/$(id -u)}
STATUS_FILE="$XDG_RUNTIME_DIR/touchpad.status"
toggle_touchpad() {
if [ ! -f "$STATUS_FILE" ] || [ "$(cat "$STATUS_FILE")" = "false" ]; then
echo "true" > "$STATUS_FILE"
action="enabled"
else
echo "false" > "$STATUS_FILE"
action="disabled"
fi
notify-send -u low -i "$notif" "Touchpad $action"
hyprctl keyword "device:$HYPRLAND_DEVICE:enabled" "$(cat "$STATUS_FILE")"
}
toggle_touchpad