Skip to content

Get list of key bindings via swaymsg #7179

@deifactor

Description

@deifactor

I'd like to be able to invoke swaymsg <something> to get the list of current bindings formatted via JSON along the lnes of

[
  {
    "key": "Mod1+shift+a",
    "ccommand": "layout none",
    "locked": false
  }
]

I don't particularly care about the format or what the exact swaymsg incantation has to be, just that it has the same information that you'd get by reading the original bindsym commands.

The use case for this is that I'm trying to build something that emulates a feature in awesomewm that shows a list of your keybinds, and in order to do that I need to know what the keybinds actually are. I can parse the output of swaymsg -t get_config, but it'd be cleaner if it was already presented in JSON format for me, and that also doesn't appear to include any 'manual' invocations of swaymsg bindsym.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or incremental improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions