agsdotfilesdotshyprlandhyprland-configricerofirofi-configshell-scriptsswwwwallustwaybarwaybar-modulewaybar-themes
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.
24 lines
686 B
24 lines
686 B
#!/bin/bash |
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # |
|
# For disabling touchpad. |
|
|
|
Touchpad_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:$Touchpad_Device:enabled" "$(cat "$STATUS_FILE")" |
|
} |
|
|
|
toggle_touchpad
|
|
|