hyprdots icon indicating copy to clipboard operation
hyprdots copied to clipboard

touch-pad script not working after following update

Open jenil1122 opened this issue 11 months ago • 6 comments

hi i am using latest hyprland . recently i got hypr config error which i fixed it by this code :

device {
    name = epic mouse V1
    sensitivity = -0.5
}

ever since then my custom script to disable touchpad isnt working script :

 bash .config/hypr/scripts/touchpad.sh                                                                                    
#!/bin/sh

HYPRLAND_DEVICE="etps/2-elantech-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
  enable_touchpad
else
  if [ $(cat "$STATUS_FILE") = "true" ]; then
    disable_touchpad
  elif [ $(cat "$STATUS_FILE") = "false" ]; then
    enable_touchpad
  fi
fi

Output :

config option <device:etps/2-elantech-touchpad:enabled> does not exist.

jenil1122 avatar Mar 23 '24 11:03 jenil1122

Did you make the script by yourself?

device { name = epic mouse V1 sensitivity = -0.5 }

Hyprland 0.37 requires this syntax you mentioned while your script tries to set a deprecated command.

Try to start here. https://wiki.hyprland.org/Configuring/Keywords/ I can't get it working too and dunno how to test this.

kRHYME7 avatar Mar 24 '24 10:03 kRHYME7

Did you make the script by yourself?

device { name = epic mouse V1 sensitivity = -0.5 }

Hyprland 0.37 requires this syntax you mentioned while your script tries to set a deprecated command.

Try to start here. https://wiki.hyprland.org/Configuring/Keywords/ I can't get it working too and dunno how to test this.

I got the script from reddit which was posted long time ago. I would be thankful if anyone can update the script with latest Hyprland

jenil1122 avatar Mar 24 '24 10:03 jenil1122

As I understand it would dynamically enable and disable that touchpad right ?

kRHYME7 avatar Mar 24 '24 11:03 kRHYME7

As I understand it would dynamically enable and disable that touchpad right ?

Yes, i just want to disable touchpad with a keybind. As sometimes it auto clicks and misbehaves.

jenil1122 avatar Mar 24 '24 15:03 jenil1122

Hello, did you solve it? I'm in the same problem.

Brazlucas avatar Mar 28 '24 16:03 Brazlucas

Yow here

https://github.com/hyprwm/Hyprland/issues/5645 https://www.reddit.com/r/hyprland/comments/1bqohmd/dynamically_enabledisable_device/

Modify this image

Following this format

hyprctl keyword "device[$HYPRLAND_DEVICE]:enabled" true

anyone interested if we got something like this in the CLI

Hyde devices [device] to toggle them. ?

kRHYME7 avatar Apr 21 '24 11:04 kRHYME7