hyprwm / hyprlang

The official implementation library for the hypr config language.
https://hyprland.org/hyprlang
GNU Lesser General Public License v3.0
128 stars 15 forks source link

Feature request: `hyprctl keyword` keyword to accept devices names again #35

Closed sluedecke closed 5 months ago

sluedecke commented 5 months ago

At least as of 0.37.1, hyprctl no longer accepts configuring input devices like hyprctl keyword device:<device name>:enabled 0

This affects transformation, e.g. for rotated touchscreens which is handled in iio-hyprland, too.

So I kindly request the keyword keyword to accept devices names again, or in general keys of categories if thats easy to do as well.

Copied over from which contains more information: https://github.com/hyprwm/Hyprland/issues/5195

It is mentioned there that this should be an issue against hyprlang.

vaxerski commented 5 months ago

syntax suggestions?

I thought about

device[amogus]:sus
sluedecke commented 5 months ago

Since device seems to be the only one which is not a 'singleton' and is differentiated by name = ...., accessing as device[name]:attribute makes sense to me.

tienbuigia commented 5 months ago

Also, hyprctl keyword $variable <value> doesn't work. Is this related?

vaxerski commented 5 months ago

wrap it in single quotes to avoid bash parsing it.... man

also if it's supposed to alter a cached setting, like device configs use hyprctl -r

tienbuigia commented 5 months ago

wrap it in single quotes to avoid bash parsing it.... man

also if it's supposed to alter a cached setting, like device configs use hyprctl -r

Yes, sorry, mb

And hyprctl getoption '$variable' doesn't work.

vaxerski commented 5 months ago

it's not an option.

vaxerski commented 5 months ago

cat[key]:value = amongus

sluedecke commented 5 months ago

Thanks for implementing this! To get a better understanding (I am not very good at reading c++ :( ) this change means that the old command (example elan9008:00-04f3:2fc4 is my touch device):

hyprctl keyword device:elan9008:00-04f3:2fc4:transform 1

is now

hyprctl keyword "device[elan9008:00-04f3:2fc4]:transform" = 1

right?

vaxerski commented 5 months ago

si