diff options
author | QMK Bot <[email protected]> | 2021-10-04 16:26:57 +0000 |
---|---|---|
committer | QMK Bot <[email protected]> | 2021-10-04 16:26:57 +0000 |
commit | 4af4ef3428d8ca39bcd3a29d2bebdf84ebe417ec (patch) | |
tree | d7876b042b49f475ad384ee46690095a83998ff8 /lib/python/qmk/cli/list/layouts.py | |
parent | 8f3ea25ddac4fcca35e74330938a701e29da3e92 (diff) | |
parent | 20f81af98af26d3e15277e402a364a513f986aa6 (diff) | |
download | qmk_firmware-4af4ef3428d8ca39bcd3a29d2bebdf84ebe417ec.tar.gz qmk_firmware-4af4ef3428d8ca39bcd3a29d2bebdf84ebe417ec.zip |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'lib/python/qmk/cli/list/layouts.py')
-rw-r--r-- | lib/python/qmk/cli/list/layouts.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/python/qmk/cli/list/layouts.py b/lib/python/qmk/cli/list/layouts.py new file mode 100644 index 0000000000..8e07afeeca --- /dev/null +++ b/lib/python/qmk/cli/list/layouts.py @@ -0,0 +1,18 @@ +"""List the keymaps for a specific keyboard +""" +from milc import cli + +from qmk.decorators import automagic_keyboard +from qmk.keyboard import keyboard_completer, keyboard_folder +from qmk.info import info_json + + [email protected]("-kb", "--keyboard", type=keyboard_folder, completer=keyboard_completer, help="Specify keyboard name. Example: monarch") [email protected]("List the layouts for a specific keyboard") +@automagic_keyboard +def list_layouts(cli): + """List the layouts for a specific keyboard + """ + info_data = info_json(cli.config.list_layouts.keyboard) + for name in sorted(info_data.get('community_layouts', [])): + print(name) |