Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing input device variable #5371

Closed
ZweiEuro opened this issue Apr 1, 2024 · 6 comments
Closed

missing input device variable #5371

ZweiEuro opened this issue Apr 1, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@ZweiEuro
Copy link

ZweiEuro commented Apr 1, 2024

Hyprland Version

System/Version info
Hyprland, built from branch HEAD at commit c5e28ebcfe00a510922779b2c568cfa52a317445  (props: bump ver 0.37.1).
Date: Sat Mar 16 14:51:49 2024
Tag: v0.37.1

flags: (if any)


System Information:
System name: Linux
Node name: thewallet
Release: 6.8.2-arch2-1
Version: #1 SMP PREEMPT_DYNAMIC Thu, 28 Mar 2024 17:06:35 +0000


GPU information: 
c1:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix1 [1002:15bf] (rev c4) (prog-if 00 [VGA controller])


os-release: NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo


plugins:

Bug or Regression?

Bug

Description

Since upgrading to 0.37.1-1 one of my scripts broke. It was supposed to toggle my touchpad (and deactivate it if a mouse was detected via another script) and now it can't find the variable anymore.

mice:
    Mouse at 6288bb5532f0:
        frmw0004:00-32ac:0006-consumer-control-1
            default speed: 0.00000
    Mouse at 6288bb678330:
        pixa3854:00-093a:0274-mouse
            default speed: 0.00000
    Mouse at 6288bb4f9770:
        pixa3854:00-093a:0274-touchpad
            default speed: 0.00000


Keyboards:
    Keyboard at 6288bb553030:
        video-bus
            rules: r "", m "", l "de", v "", o ""
            active keymap: German
            main: no
    Keyboard at 6288bb5197c0:
        power-button
            rules: r "", m "", l "de", v "", o ""
            active keymap: German
            main: no
    Keyboard at 6288bb628e10:
        frmw0004:00-32ac:0006-consumer-control
            rules: r "", m "", l "de", v "", o ""
            active keymap: German
            main: no
    Keyboard at 6288bb67ba40:
        frmw0004:00-32ac:0006-wireless-radio-control
            rules: r "", m "", l "de", v "", o ""
            active keymap: German
            main: no
    Keyboard at 6288bb6e11f0:
        at-translated-set-2-keyboard
            rules: r "", m "", l "de", v "", o ""
            active keymap: German
            main: yes


Tablets:


Touch:


Switches:
    Switch Device at 6288bb4078d0:
        Lid Switch

my script

#!/bin/sh

# When executed toggle touchpad state

# Set device to be toggled
HYPRLAND_DEVICE="pixa3854:00-093a:0274-touchpad"
HYPRLAND_VARIABLE="device:$HYPRLAND_DEVICE:enabled"

if [ -z "$XDG_RUNTIME_DIR" ]; then
  export XDG_RUNTIME_DIR=/run/user/$(id -u)
fi

# Check if device is currently enabled (1 = enabled, 0 = disabled)
DEVICE="$(hyprctl getoption $HYPRLAND_VARIABLE | grep 'int: 1')"

if [ -z "$DEVICE" ]; then
    # if the device is disabled, then enable
      # notify-send -u normal "Enabling Touchpad"
    hyprctl keyword $HYPRLAND_VARIABLE true
else
    # if the device is enabled, then disable
    # notify-send -u normal "Disabling Touchpad"
    hyprctl keyword $HYPRLAND_VARIABLE false
fi

My script just results in:
config option <device:pixa3854:00-093a:0274-touchpad:enabled> does not exist. which just plain confuses me

How to reproduce

Use the script above on a touchpad device, I don't have another machine to try this on sadly.

Crash reports, logs, images, videos

No response

@ZweiEuro ZweiEuro added the bug Something isn't working label Apr 1, 2024
@sungyoonc
Copy link
Contributor

Currently you have to do this. #4283

@ZweiEuro
Copy link
Author

ZweiEuro commented Apr 1, 2024

@sungyoonc Why do i need to add this now and not in earlier versions ?

@sungyoonc
Copy link
Contributor

sungyoonc commented Apr 1, 2024

Because of hyprlang changes on #4656 (in v0.36.0).

@ZweiEuro ZweiEuro changed the title missing input device vairable missing input device variable Apr 1, 2024
@ZweiEuro
Copy link
Author

ZweiEuro commented Apr 1, 2024

okay so i need to use some temporary file somewhere and i can't cleanly query the status of the input device anymore from hyprland directly?

@sungyoonc
Copy link
Contributor

As far as I know, yes.

@vaxerski
Copy link
Member

vaxerski commented Apr 1, 2024

on hyprlang-git you can device[nameofdevice]:prop

@vaxerski vaxerski closed this as not planned Won't fix, can't repro, duplicate, stale Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants