hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
21.07k stars 881 forks source link

Wrong work of hyprctl with device's name with dashes #2340

Closed filtsin closed 1 year ago

filtsin commented 1 year ago

Hello, I have keyboard device with strange name in devices listing: "--varmilo"

$ hyprctl devices

...
Keyboard at 5646e74c3260:
        --varmilo

I can configure this device in hyprland.conf

device:--varmilo {
    kb_options = grp:caps_toggle
}

All works. But I can not use hyprctl switchxkblayout with this strange name (because of parsing error, I think)

$ hyprctl switchxkblayout "--varmilo" next

usage: hyprctl [(opt)flags] [command] [(opt)args]

commands:
    monitors
    workspaces
    activeworkspace
    clients
    activewindow
    layers
    devices
    binds
    dispatch
    keyword
    version
    kill
    splash
    hyprpaper
    reload
    setcursor
    getoption
    cursorpos
    switchxkblayout
    seterror
    setprop
    plugin
    notify
    globalshortcuts

flags:
    -j -> output in JSON
    --batch -> execute a batch of commands, separated by ';'
MightyPlaza commented 1 year ago

Try the following: hyprctl switchxkblayout -- --varmilo next

filtsin commented 1 year ago

Try the following: hyprctl switchxkblayout -- --varmilo next

Thx, it works