29 lines
533 B
Bash
Executable File
29 lines
533 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
touchpad="uniw0001:00-093a:0255-touchpad"
|
|
statFile="/tmp/tpEnabled"
|
|
|
|
if [ ! -f "$statFile" ]; then
|
|
echo "false" > "$statFile"
|
|
fi
|
|
|
|
current=$(cat "$statFile")
|
|
|
|
if [[ "$current" = "true" ]]; then
|
|
newState="false"
|
|
msg="disabled"
|
|
else
|
|
newState="true"
|
|
msg="enabled"
|
|
fi
|
|
|
|
hyprctl eval "hl.device({ name = \"$touchpad\", enabled = $newState})"
|
|
echo "$newState" > "$statFile"
|
|
|
|
dunstify -u low \
|
|
-a Touchpad \
|
|
-i ~/.icons/candy-icons/apps/scalable/cs-desktop.svg \
|
|
-r 365 \
|
|
-t 1000 \
|
|
"Touchpad $msg"
|