diff --git a/.github/workflows/qmk.yml b/.github/workflows/qmk.yml index 7f0ded6..77d5b4d 100644 --- a/.github/workflows/qmk.yml +++ b/.github/workflows/qmk.yml @@ -41,16 +41,23 @@ jobs: path: haunt98_qmk_keymaps - name: Copy keymaps run: | + rm -rf keyboards/dztech/dz60rgb_wkl/keymaps/haunt98 cp -rf haunt98_qmk_keymaps/dztech_dz60rgb_wkl/keymaps/haunt98 keyboards/dztech/dz60rgb_wkl/keymaps/ + rm -rf users/haunt98 + cp -rf haunt98_qmk_keymaps/users/haunt98 users/ - name: Lint run: | qmk lint -kb dztech/dz60rgb_wkl/v2_1 -km haunt98 - name: Build firmware run: | - qmk compile -j 8 -kb dztech/dz60rgb_wkl/v2_1 -km haunt98 + make dztech/dz60rgb_wkl/v2_1:haunt98 - name: Convert keymaps JSON run: | - qmk c2json -kb dztech/dz60rgb_wkl/v2_1 -km haunt98 -o dztech_dz60rgb_wkl_haunt98_keymap.json haunt98_qmk_keymaps/dztech_dz60rgb_wkl/keymaps/haunt98/keymap.c + qmk c2json -kb dztech/dz60rgb_wkl/v2_1 \ + -km haunt98 \ + -o dztech_dz60rgb_wkl_haunt98_keymap.json \ + --no-cpp \ + haunt98_qmk_keymaps/dztech_dz60rgb_wkl/keymaps/haunt98/keymap.c - name: Extra run: | qmk info -m -l -kb dztech/dz60rgb_wkl/v2_1 -km haunt98 diff --git a/Makefile b/Makefile index cb5da86..fd4bb36 100644 --- a/Makefile +++ b/Makefile @@ -5,8 +5,15 @@ all: $(MAKE) draw format: - clang-format -i dztech_dz60rgb_wkl/keymaps/haunt98/*.c dztech_dz60rgb_wkl/keymaps/haunt98/*.h & \ - clang-format-mp-15 -i dztech_dz60rgb_wkl/keymaps/haunt98/*.c dztech_dz60rgb_wkl/keymaps/haunt98/*.h + clang-format -i dztech_dz60rgb_wkl/keymaps/haunt98/*.c \ + dztech_dz60rgb_wkl/keymaps/haunt98/*.h \ + users/haunt98/*.c \ + users/haunt98/*.h \ + & \ + clang-format-mp-15 -i dztech_dz60rgb_wkl/keymaps/haunt98/*.c \ + dztech_dz60rgb_wkl/keymaps/haunt98/*.h \ + users/haunt98/*.c \ + users/haunt98/*.h deno fmt dztech_dz60rgb_wkl/keymaps_json/haunt98/keymap.json # From changeloguru diff --git a/dztech_dz60rgb_wkl/keymaps/haunt98/config.h b/dztech_dz60rgb_wkl/keymaps/haunt98/config.h index 960a2d4..f015967 100644 --- a/dztech_dz60rgb_wkl/keymaps/haunt98/config.h +++ b/dztech_dz60rgb_wkl/keymaps/haunt98/config.h @@ -3,27 +3,6 @@ #pragma once -// https://github.com/qmk/qmk_firmware/blob/master/docs/config_options.md - -// Optimize -// https://github.com/qmk/qmk_firmware/blob/master/docs/squeezing_avr.md -#define NO_ACTION_ONESHOT - -#define LAYER_STATE_8BIT - -// Feature -// https://github.com/qmk/qmk_firmware/blob/master/docs/tap_hold.md -#define TAPPING_TERM 200 -#define QUICK_TAP_TERM 120 -#define HOLD_ON_OTHER_KEY_PRESS -#define RETRO_TAPPING - -// https://github.com/qmk/qmk_firmware/blob/master/docs/feature_debounce_type.md -#ifdef DEBOUNCE -# undef DEBOUNCE -#endif -#define DEBOUNCE 5 - // https://github.com/qmk/qmk_firmware/blob/master/docs/feature_rgb_matrix.md // https://www.youtube.com/watch?v=7f3usatOIKM #ifdef RGB_MATRIX_ENABLE @@ -59,9 +38,3 @@ # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 # define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS #endif - -// https://github.com/qmk/qmk_firmware/blob/master/docs/config_options.md -// https://github.com/qmk/qmk_firmware/issues/17316 -#define USB_SUSPEND_WAKEUP_DELAY 200 - -#define FORCE_NKRO diff --git a/dztech_dz60rgb_wkl/keymaps/haunt98/keymap.c b/dztech_dz60rgb_wkl/keymaps/haunt98/keymap.c index e473380..a577b1f 100644 --- a/dztech_dz60rgb_wkl/keymaps/haunt98/keymap.c +++ b/dztech_dz60rgb_wkl/keymaps/haunt98/keymap.c @@ -2,21 +2,7 @@ // SPDX-License-Identifier: MIT #include QMK_KEYBOARD_H - -// https://github.com/qmk/qmk_firmware/blob/master/docs/feature_tap_dance.md -enum custom_tap_dance { - TD_SAFE_BOOT, -}; - -void tap_dance_safe_boot(tap_dance_state_t* state, void* user_data) { - if (state->count >= 3) { - reset_keyboard(); - } -} - -tap_dance_action_t tap_dance_actions[] = { - [TD_SAFE_BOOT] = ACTION_TAP_DANCE_FN(tap_dance_safe_boot), -}; +#include "haunt98.h" enum layers { LAYER_QWERTY, diff --git a/users/haunt98/config.h b/users/haunt98/config.h new file mode 100644 index 0000000..af6268f --- /dev/null +++ b/users/haunt98/config.h @@ -0,0 +1,31 @@ +// Copyright 2023 haunt98 +// SPDX-License-Identifier: MIT + +#pragma once + +// https://github.com/qmk/qmk_firmware/blob/master/docs/config_options.md + +// Optimize +// https://github.com/qmk/qmk_firmware/blob/master/docs/squeezing_avr.md +#define NO_ACTION_ONESHOT + +#define LAYER_STATE_8BIT + +// Feature +// https://github.com/qmk/qmk_firmware/blob/master/docs/tap_hold.md +#define TAPPING_TERM 200 +#define QUICK_TAP_TERM 120 +#define HOLD_ON_OTHER_KEY_PRESS +#define RETRO_TAPPING + +// https://github.com/qmk/qmk_firmware/blob/master/docs/feature_debounce_type.md +#ifdef DEBOUNCE +# undef DEBOUNCE +#endif +#define DEBOUNCE 5 + +// https://github.com/qmk/qmk_firmware/blob/master/docs/config_options.md +// https://github.com/qmk/qmk_firmware/issues/17316 +#define USB_SUSPEND_WAKEUP_DELAY 200 + +#define FORCE_NKRO diff --git a/users/haunt98/haunt98.c b/users/haunt98/haunt98.c new file mode 100644 index 0000000..a8b18c3 --- /dev/null +++ b/users/haunt98/haunt98.c @@ -0,0 +1,6 @@ +// Copyright 2023 haunt98 +// SPDX-License-Identifier: MIT + +#include "haunt98.h" + +// Placebo for the future me diff --git a/users/haunt98/haunt98.h b/users/haunt98/haunt98.h new file mode 100644 index 0000000..3ebad65 --- /dev/null +++ b/users/haunt98/haunt98.h @@ -0,0 +1,9 @@ +// Copyright 2023 haunt98 +// SPDX-License-Identifier: MIT + +#pragma once + +// https://github.com/qmk/qmk_firmware/blob/master/docs/feature_userspace.md + +#include QMK_KEYBOARD_H +#include "tap_dance.h" diff --git a/dztech_dz60rgb_wkl/keymaps/haunt98/rules.mk b/users/haunt98/rules.mk similarity index 89% rename from dztech_dz60rgb_wkl/keymaps/haunt98/rules.mk rename to users/haunt98/rules.mk index 1437524..e6404ad 100644 --- a/dztech_dz60rgb_wkl/keymaps/haunt98/rules.mk +++ b/users/haunt98/rules.mk @@ -1,9 +1,5 @@ # https://github.com/qmk/qmk_firmware/blob/master/docs/config_options.md -# VIA -# https://www.caniusevia.com/docs/configuring_qmk -VIA_ENABLE = no - # Optimize # https://github.com/qmk/qmk_firmware/blob/master/docs/squeezing_avr.md LTO_ENABLE = yes @@ -13,16 +9,20 @@ COMMAND_ENABLE = no MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes -MAGIC_ENABLE = no - # Feature # https://github.com/qmk/qmk_firmware/blob/master/docs/feature_bootmagic.md +MAGIC_ENABLE = no BOOTMAGIC_ENABLE = yes -# https://github.com/qmk/qmk_firmware/blob/master/docs/feature_debounce_type.md -DEBOUNCE_TYPE = sym_eager_pk - # https://github.com/qmk/qmk_firmware/blob/master/docs/feature_tap_dance.md TAP_DANCE_ENABLE = yes +# Feature +# https://github.com/qmk/qmk_firmware/blob/master/docs/feature_debounce_type.md +DEBOUNCE_TYPE = sym_eager_pk + NKRO_ENABLE = yes + +# Custom C +SRC += haunt98.c +SRC += tap_dance.c diff --git a/users/haunt98/tap_dance.c b/users/haunt98/tap_dance.c new file mode 100644 index 0000000..5a368f0 --- /dev/null +++ b/users/haunt98/tap_dance.c @@ -0,0 +1,14 @@ +// Copyright 2023 haunt98 +// SPDX-License-Identifier: MIT + +#include "tap_dance.h" + +void tap_dance_safe_boot(tap_dance_state_t* state, void* user_data) { + if (state->count >= 3) { + reset_keyboard(); + } +} + +tap_dance_action_t tap_dance_actions[] = { + [TD_SAFE_BOOT] = ACTION_TAP_DANCE_FN(tap_dance_safe_boot), +}; diff --git a/users/haunt98/tap_dance.h b/users/haunt98/tap_dance.h new file mode 100644 index 0000000..a6ab48c --- /dev/null +++ b/users/haunt98/tap_dance.h @@ -0,0 +1,11 @@ +// Copyright 2023 haunt98 +// SPDX-License-Identifier: MIT + +#pragma once + +#include QMK_KEYBOARD_H + +// https://github.com/qmk/qmk_firmware/blob/master/docs/feature_tap_dance.md +enum custom_tap_dance { + TD_SAFE_BOOT, +};