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
19.55k stars 821 forks source link

hyprctl should be more helpful discovering usage #4300

Open hholst80 opened 8 months ago

hholst80 commented 8 months ago

Description

[I] root@neo ~
# man hyprctl 
No manual entry for hyprctl
[I] root@neo ~ [16]
# 
[I] root@neo ~ [16]
# hyprctl --help
usage: hyprctl [(opt)flags] [command] [(opt)args]

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

flags:
    -j -> output in JSON
    --batch -> execute a batch of commands, separated by ';'
    --instance (-i) -> use a specific instance. Can be either signature or index in hyprctl instances (0, 1, etc)

[I] root@neo ~ [1]
# 

So far not terrible. But individual commands should help the user to explore and figure out the usage.

image

vaxerski commented 8 months ago

I mean that's what the wiki is for no?

hholst80 commented 8 months ago

I think the CLI tooling should be helpful enough not to require me to have a working internet connection to do anything useful. For most commands it is sufficient to just give the command and it will emit some output. But to send a notification, I have to know the magic handshake. If I fail to provide the right format, the tool should tell me what the right format is.

vaxerski commented 8 months ago

fair enough I guess

JPDucky commented 7 months ago

I agree heavily with this, trying to figure out more advanced usage of hyprctl is a nightmare as the current given documentation does not go into much detail.

vaxerski commented 7 months ago

MRs welcome.