Initial import: Lua config, trimmed omarchy scripts, theme system
This commit is contained in:
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
# archypr:summary=Enable, disable, or toggle the touchpad
|
||||
# archypr:args=[on|off|toggle]
|
||||
|
||||
STATE_CONF="$HOME/.local/state/omarchy/toggles/hypr/touchpad-disabled.conf"
|
||||
|
||||
device="$(archypr-w-touchpad)"
|
||||
|
||||
if [[ -z $device ]]; then
|
||||
echo "No touchpad device found" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
enable() {
|
||||
hyprctl keyword "device[$device]:enabled" true >/dev/null
|
||||
rm -f "$STATE_CONF"
|
||||
archypr-swayosd-client --custom-icon input-touchpad-symbolic --custom-message "Touchpad enabled"
|
||||
}
|
||||
|
||||
disable() {
|
||||
hyprctl keyword "device[$device]:enabled" false >/dev/null
|
||||
mkdir -p "$(dirname "$STATE_CONF")"
|
||||
printf 'device {\n name = %s\n enabled = false\n}\n' "$device" > "$STATE_CONF"
|
||||
archypr-swayosd-client --custom-icon touchpad-disabled-symbolic --custom-message "Touchpad disabled"
|
||||
}
|
||||
|
||||
case "${1:-toggle}" in
|
||||
on) enable ;;
|
||||
off) disable ;;
|
||||
toggle) if [[ -f $STATE_CONF ]]; then enable; else disable; fi ;;
|
||||
esac
|
||||
Reference in New Issue
Block a user