Deleted toggle-touchpad
This commit is contained in:
parent
d9fd225f36
commit
3fa42c5432
1 changed files with 0 additions and 35 deletions
|
@ -1,35 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
HYPRLAND_DEVICE="asue1209:00-04f3:319f-touchpad"
|
|
||||||
|
|
||||||
if [ -z "$XDG_RUNTIME_DIR" ]; then
|
|
||||||
export XDG_RUNTIME_DIR=/run/user/$(id -u)
|
|
||||||
fi
|
|
||||||
|
|
||||||
export STATUS_FILE="$XDG_RUNTIME_DIR/touchpad.status"
|
|
||||||
|
|
||||||
enable_touchpad() {
|
|
||||||
printf "true" > "$STATUS_FILE"
|
|
||||||
|
|
||||||
notify-send -u normal "Enabling Touchpad"
|
|
||||||
|
|
||||||
hyprctl keyword "device:$HYPRLAND_DEVICE:enabled" true
|
|
||||||
}
|
|
||||||
|
|
||||||
disable_touchpad() {
|
|
||||||
printf "false" > "$STATUS_FILE"
|
|
||||||
|
|
||||||
notify-send -u normal "Disabling Touchpad"
|
|
||||||
|
|
||||||
hyprctl keyword "device:$HYPRLAND_DEVICE:enabled" false
|
|
||||||
}
|
|
||||||
|
|
||||||
if ! [ -f "$STATUS_FILE" ]; then
|
|
||||||
disable_touchpad
|
|
||||||
else
|
|
||||||
if [ $(cat "$STATUS_FILE") = "true" ]; then
|
|
||||||
disable_touchpad
|
|
||||||
elif [ $(cat "$STATUS_FILE") = "false" ]; then
|
|
||||||
enable_touchpad
|
|
||||||
fi
|
|
||||||
fi
|
|
Loading…
Reference in a new issue