forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow community layouts to be specified in info.json (qmk#14682)
* move the community layout detection to python * fixup tests
- Loading branch information
1 parent
f72b2ad
commit 20f81af
Showing
4 changed files
with
21 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
||
|
||
@cli.argument("-kb", "--keyboard", type=keyboard_folder, completer=keyboard_completer, help="Specify keyboard name. Example: monarch") | ||
@cli.subcommand("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) |