diff options
| -rw-r--r-- | .config/qmk.ini | 72 | ||||
| -rw-r--r-- | Justfile | 35 | ||||
| -rw-r--r-- | chak/Makefile | 14 | ||||
| -rw-r--r-- | keyboards/crkbd/keymaps/chak/config.h (renamed from chak/keymap/config.h) | 2 | ||||
| -rw-r--r-- | keyboards/crkbd/keymaps/chak/keymap.c (renamed from chak/keymap/keymap.c) | 3 | ||||
| -rw-r--r-- | keyboards/crkbd/keymaps/chak/rules.mk (renamed from chak/keymap/rules.mk) | 0 | ||||
| -rw-r--r-- | qmk.json | 4 | ||||
| -rw-r--r-- | qmk.mk | 24 | ||||
| m--------- | qmk_firmware | 0 | ||||
| -rw-r--r-- | shell.nix | 9 |
10 files changed, 122 insertions, 41 deletions
diff --git a/.config/qmk.ini b/.config/qmk.ini new file mode 100644 index 0000000..b6e8e1e --- /dev/null +++ b/.config/qmk.ini @@ -0,0 +1,72 @@ +[user] +qmk_home = ./qmk_firmware +overlay_dir = . + +[config] + +[console] + +[c2json] + +[compile] + +[find] + +[flash] + +[format_c] + +[format_python] + +[format_text] + +[generate_autocorrect_data] + +[generate_compilation_database] + +[generate_develop_pr_list] + +[generate_dfu_header] + +[generate_info_json] + +[generate_make_dependencies] + +[git_submodule] + +[hello] + +[info] + +[license_check] + +[lint] + +[kle2json] + +[list_keymaps] + +[list_layouts] + +[mass_compile] + +[new_keyboard] + +[new_keymap] + +[painter_convert_graphics] + +[painter_make_font_image] + +[painter_convert_font_image] + +[test_c] + +[userspace_add] + +[userspace_remove] + +[userspace_compile] + +[general] + diff --git a/Justfile b/Justfile new file mode 100644 index 0000000..e2ead73 --- /dev/null +++ b/Justfile @@ -0,0 +1,35 @@ +# --- Keyboards --- # + +chak: (flash-split "crkbd" "chak" "liatris" "liatris") + +# --- Logic --- # + +qmk := "qmk --config-file .config/qmk.ini" + +clean: + rm *.uf2 ./qmk_firmware/*.uf2 ./qmk_firmware/.build + +flash-split keyboard keymap l_controller r_controller: (flash keyboard keymap l_controller) + @echo "!! Wait for controller to reset (display/led flash) and plug other half in" + @sleep 3 + just flash {{keyboard}} {{keymap}} {{r_controller}} + +flash keyboard keymap controller: (compile keyboard keymap controller) (_flash keyboard keymap controller) + +compile keyboard keymap controller: + {{qmk}} compile -kb {{keyboard}} -km {{keymap}} -e CONVERT_TO={{controller}} + +_flash keyboard keymap controller: + @echo "!!" + @echo "!! Put keyboard into flash mode" + @echo "!!" + @echo -en "Waiting..." + @until [ -b /dev/disk/by-label/RPI-RP2 ]; do sleep 0.5; echo -en "."; done + @echo + udisksctl mount -b /dev/disk/by-label/RPI-RP2 || true + cp ./{{keyboard}}*{{keymap}}*{{controller}}.uf2 $(lsblk /dev/disk/by-label/RPI-RP2 -o MOUNTPOINT -nr) + +_configure: + {{qmk}} config user.qmk_home=./qmk_firmware + {{qmk}} config user.overlay_dir=. + {{qmk}} doctor diff --git a/chak/Makefile b/chak/Makefile deleted file mode 100644 index 38a0482..0000000 --- a/chak/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -KEYBOARD=crkbd -FULL_KEYBOARD=crkbd/rev1 -CONTROLLER=promicro_rp2040 - -include ../qmk.mk - -all: - $(qmk_clean) - $(qmk_compile) - $(qmk_flash_rp2) - @echo "!! Wait for controller to reset (display/led flash) and plug other half in" - @sleep 3 - $(qmk_flash_rp2) - $(qmk_clean) diff --git a/chak/keymap/config.h b/keyboards/crkbd/keymaps/chak/config.h index c4f6592..a4e6cdb 100644 --- a/chak/keymap/config.h +++ b/keyboards/crkbd/keymaps/chak/config.h @@ -63,7 +63,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. # define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define RGB_MATRIX_LED_PROCESS_LIMIT (RGB_MATRIX_LED_COUNT + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) # define RGB_MATRIX_LED_FLUSH_LIMIT 32 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +// # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. # define RGB_MATRIX_DEFAULT_SPD 1 // Sets the default animation speed, if none has been set # define RGB_MATRIX_HUE_STEP 8 # define RGB_MATRIX_SAT_STEP 8 diff --git a/chak/keymap/keymap.c b/keyboards/crkbd/keymaps/chak/keymap.c index aa53ee0..28b6b7e 100644 --- a/chak/keymap/keymap.c +++ b/keyboards/crkbd/keymaps/chak/keymap.c @@ -57,10 +57,9 @@ const key_override_t shift_super_system_sleep = ko_make_basic(MOD_MASK_SHIFT, KC_LGUI, KC_SLEP), shift_tab_underscore = ko_make_basic(MOD_MASK_SHIFT, KC_TAB, KC_UNDS) ; -const key_override_t **key_overrides = (const key_override_t *[]){ +const key_override_t *key_overrides[] = { &shift_super_system_sleep, &shift_tab_underscore, - NULL // Null terminate the array of overrides! }; bool get_retro_tapping(uint16_t keycode, keyrecord_t *record) { diff --git a/chak/keymap/rules.mk b/keyboards/crkbd/keymaps/chak/rules.mk index 94f707a..94f707a 100644 --- a/chak/keymap/rules.mk +++ b/keyboards/crkbd/keymaps/chak/rules.mk diff --git a/qmk.json b/qmk.json new file mode 100644 index 0000000..b4714c5 --- /dev/null +++ b/qmk.json @@ -0,0 +1,4 @@ +{ + "userspace_version": "1.0", + "build_targets": [] +} @@ -1,24 +0,0 @@ -define qmk_compile - rm ../qmk_firmware/keyboards/$(KEYBOARD)/keymaps/Syndamia 2>/dev/null || true - # Compile - mkdir -p ../qmk_firmware/keyboards/$(KEYBOARD)/keymaps - ln -s $(shell pwd)/keymap ../qmk_firmware/keyboards/$(KEYBOARD)/keymaps/Syndamia - qmk compile -kb $(FULL_KEYBOARD) -km Syndamia -e CONVERT_TO=$(CONTROLLER) - # Mandatory cleanup - rm ../qmk_firmware/keyboards/$(KEYBOARD)/keymaps/Syndamia -endef - -define qmk_flash_rp2 - @echo "!!" - @echo "!! Put keyboard into flash mode" - @echo "!!" - @echo -en "Waiting..." - @until [ -b /dev/disk/by-label/RPI-RP2 ]; do sleep 0.5; echo -en "."; done - @echo - udisksctl mount -b /dev/disk/by-label/RPI-RP2 || true - cp ../qmk_firmware/*.uf2 $$(lsblk /dev/disk/by-label/RPI-RP2 -o MOUNTPOINT -nr) -endef - -define qmk_cleanup - rm ../qmk_firmware/*.uf2 -endef diff --git a/qmk_firmware b/qmk_firmware -Subproject f76cc320fd9f3365a80cc0d8af2990bc28d76bd +Subproject 5eb53be671b4103626d0c0bb7828474d8be03ec diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..2586ed2 --- /dev/null +++ b/shell.nix @@ -0,0 +1,9 @@ +{ pkgs ? import <nixpkgs> {} }: +pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + qmk + just + util-linux + udisks + ]; +} |
