From d060f62eb0e8c9223b0361607700e0c1c0c932a1 Mon Sep 17 00:00:00 2001 From: Duncan Sutherland Date: Sun, 15 Oct 2023 10:21:41 +0100 Subject: [PATCH 1/3] QMK tidy --- skywatch/config.h | 3 +-- skywatch/info.json | 61 +++++++++++++++++++++++++--------------------- skywatch/mcuconf.h | 2 +- skywatch/rules.mk | 7 ------ 4 files changed, 35 insertions(+), 38 deletions(-) diff --git a/skywatch/config.h b/skywatch/config.h index be306bf..b782980 100644 --- a/skywatch/config.h +++ b/skywatch/config.h @@ -5,7 +5,6 @@ #define I2C1_SDA_PIN GP14 #define OLED_BRIGHTNESS 128 - #ifdef OLED_ENABLE # define OLED_DISPLAY_128X64 # define OLED_FONT_H "./lib/glcdfont.c" @@ -14,4 +13,4 @@ #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP17 -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U \ No newline at end of file +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U diff --git a/skywatch/info.json b/skywatch/info.json index dcba5f9..3e02f8d 100644 --- a/skywatch/info.json +++ b/skywatch/info.json @@ -9,7 +9,15 @@ "device_version": "0.5.0" }, "features": { - "bootmagic": true + "rgblight": true, + "bootmagic": true, + "mousekey": true, + "oled": true, + "wpm": true, + "pointing_device": true + }, + "build": { + "lto": true }, "ws2812": { "pin": "GP27", @@ -49,48 +57,45 @@ "layouts": { "LAYOUT": { "layout": [ - {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 0], "x": 0, "y": 0.5}, {"matrix": [0, 1], "x": 1, "y": 0}, {"matrix": [0, 2], "x": 2, "y": 0}, {"matrix": [0, 3], "x": 3, "y": 0}, {"matrix": [0, 4], "x": 4, "y": 0}, - {"matrix": [0, 5], "x": 5, "y": 0}, - {"matrix": [0, 6], "x": 6, "y": 0}, - {"matrix": [0, 7], "x": 7, "y": 0}, - {"matrix": [0, 8], "x": 8, "y": 0}, - {"matrix": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 7, "y": 0}, + {"matrix": [0, 6], "x": 8, "y": 0}, + {"matrix": [0, 7], "x": 9, "y": 0}, + {"matrix": [0, 8], "x": 10, "y": 0}, + {"matrix": [0, 9], "x": 11, "y": 0.5}, - {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 0], "x": 0, "y": 1.5}, {"matrix": [1, 1], "x": 1, "y": 1}, {"matrix": [1, 2], "x": 2, "y": 1}, {"matrix": [1, 3], "x": 3, "y": 1}, {"matrix": [1, 4], "x": 4, "y": 1}, - {"matrix": [1, 5], "x": 5, "y": 1}, - {"matrix": [1, 6], "x": 6, "y": 1}, - {"matrix": [1, 7], "x": 7, "y": 1}, - {"matrix": [1, 8], "x": 8, "y": 1}, - {"matrix": [1, 9], "x": 9, "y": 1}, + {"matrix": [1, 5], "x": 7, "y": 1}, + {"matrix": [1, 6], "x": 8, "y": 1}, + {"matrix": [1, 7], "x": 9, "y": 1}, + {"matrix": [1, 8], "x": 10, "y": 1}, + {"matrix": [1, 9], "x": 11, "y": 1.5}, - {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 0], "x": 0, "y": 2.5}, {"matrix": [2, 1], "x": 1, "y": 2}, {"matrix": [2, 2], "x": 2, "y": 2}, {"matrix": [2, 3], "x": 3, "y": 2}, {"matrix": [2, 4], "x": 4, "y": 2}, - {"matrix": [2, 5], "x": 5, "y": 2}, - {"matrix": [2, 6], "x": 6, "y": 2}, - {"matrix": [2, 7], "x": 7, "y": 2}, - {"matrix": [2, 8], "x": 8, "y": 2}, - {"matrix": [2, 9], "x": 9, "y": 2}, - - - {"matrix": [3, 2], "x": 2, "y": 3}, - {"matrix": [3, 3], "x": 3, "y": 3}, - {"matrix": [3, 4], "x": 4, "y": 3}, - {"matrix": [3, 5], "x": 5, "y": 3}, - {"matrix": [3, 6], "x": 6, "y": 3}, - {"matrix": [3, 7], "x": 7, "y": 3} - + {"matrix": [2, 5], "x": 7, "y": 2}, + {"matrix": [2, 6], "x": 8, "y": 2}, + {"matrix": [2, 7], "x": 9, "y": 2}, + {"matrix": [2, 8], "x": 10, "y": 2}, + {"matrix": [2, 9], "x": 11, "y": 2.5}, + {"matrix": [3, 2], "x": 3, "y": 3}, + {"matrix": [3, 3], "x": 4, "y": 3.25}, + {"matrix": [3, 4], "x": 5, "y": 3.5}, + {"matrix": [3, 5], "x": 6, "y": 3.5}, + {"matrix": [3, 6], "x": 7, "y": 3.25}, + {"matrix": [3, 7], "x": 8, "y": 3} ] } } diff --git a/skywatch/mcuconf.h b/skywatch/mcuconf.h index 8c1a723..b77ca7c 100644 --- a/skywatch/mcuconf.h +++ b/skywatch/mcuconf.h @@ -5,4 +5,4 @@ #undef RP_I2C_USE_I2C0 #undef RP_I2C_USE_I2C1 #define RP_I2C_USE_I2C0 TRUE -#define RP_I2C_USE_I2C1 TRUE \ No newline at end of file +#define RP_I2C_USE_I2C1 TRUE diff --git a/skywatch/rules.mk b/skywatch/rules.mk index d308074..007ea4a 100644 --- a/skywatch/rules.mk +++ b/skywatch/rules.mk @@ -1,14 +1,7 @@ -OLED_ENABLE = yes OLED_DRIVER = ssd1306 OLED_DRIVER_ENABLE= yes OLED_TRANSPORT = i2c OPT_DEFS += -DHAL_USE_I2C=TRUE -# Enable Trackball -POINTING_DEVICE_ENABLE = yes POINTING_DEVICE_DRIVER = pimoroni_trackball -MOUSEKEY_ENABLE = yes -WPM_ENABLE = yes -LTO_ENABLE = yes -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow \ No newline at end of file From 2e3bf233c1780ec183f5c4b00035105c0b4d6319 Mon Sep 17 00:00:00 2001 From: Duncan Sutherland Date: Sun, 15 Oct 2023 10:27:03 +0100 Subject: [PATCH 2/3] add community layout support --- skywatch/info.json | 3 ++- skywatch/keymaps/default/keymap.c | 16 ++++++++-------- skywatch/keymaps/vial/keymap.c | 16 ++++++++-------- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/skywatch/info.json b/skywatch/info.json index 3e02f8d..d8983fb 100644 --- a/skywatch/info.json +++ b/skywatch/info.json @@ -54,8 +54,9 @@ "layout_aliases": { "LAYOUT_reviung41": "LAYOUT" }, + "community_layouts": ["split_3x5_3"], "layouts": { - "LAYOUT": { + "LAYOUT_split_3x5_3": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0.5}, {"matrix": [0, 1], "x": 1, "y": 0}, diff --git a/skywatch/keymaps/default/keymap.c b/skywatch/keymaps/default/keymap.c index fa4c560..6af5907 100644 --- a/skywatch/keymaps/default/keymap.c +++ b/skywatch/keymaps/default/keymap.c @@ -70,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ╰──────┤ SPACE │ SPACE ├──────╯ // ╰───────┴────────╯ - [_COLEMAK] = LAYOUT( + [_COLEMAK] = LAYOUT_split_3x5_3( TR_Q, TR_W, TR_F, TR_P, TR_G, TR_J, TR_L, TR_U, TR_Y, KC_BSPC, TR_A, TR_R, TR_S, ARROW_T, TR_D, TR_H, TR_N, TR_E, TR_IDOT, TR_O, LALT_T(TR_Z), LCTL_T(TR_X), LSFT_T(TR_C), TR_V, TR_B, TR_K, TR_M, RSFT_T(TR_COMM), RCTL_T(TR_DOT), LALT_T(KC_PSLS), @@ -92,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT( + [_QWERTY] = LAYOUT_split_3x5_3( TR_Q, TR_W, TR_E, TR_R, TR_T, TR_Y, TR_U, TR_IDOT, TR_O, TR_P, TR_A, TR_S, TR_D, TR_F, TR_G, TR_H, TR_J, TR_K, TR_L, TR_SCLN, TR_Z, TR_X, TR_C, TR_V, TR_B, TR_N, TR_M, TR_COMM, TR_DOT, TR_SLSH, @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ╰───────┴────────╯ - [_LOWER] = LAYOUT( + [_LOWER] = LAYOUT_split_3x5_3( _______, _______, _______, _______, _______, TR_LPRN, TR_RPRN, TR_EQL, TR_AMPR, TR_PIPE, _______, _______, _______, _______, _______, TR_LCBR, TR_RCBR, TR_UNDS, TR_DLR, TR_QUOT, _______, _______, _______, _______, _______, TR_LBRC, TR_RBRC, TR_LABK, TR_RABK, TR_BSLS, @@ -139,7 +139,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_RAISE] = LAYOUT( + [_RAISE] = LAYOUT_split_3x5_3( TR_MINS, TR_1, TR_2, TR_3, TR_PLUS, KC_F10, KC_F1, KC_F2, KC_F3, KC_DEL, TR_ASTR, TR_4, TR_5, TR_6, TR_DQUO, KC_F11, KC_F4, KC_F5, KC_F6, _______, TR_PERC, TR_7, TR_8, TR_9, TR_0, KC_F12, KC_7, KC_F8, KC_9, _______, @@ -162,7 +162,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ╰───────┴────────╯ - [_FNR] = LAYOUT( + [_FNR] = LAYOUT_split_3x5_3( KC_ESC, _______, TR_EURO, TR_PND, TR_GBRV, _______, _______, _______, _______, _______, TR_EXLM, TR_AT, TR_SCED, TR_LIRA, TR_GRV, _______, _______, _______, _______, _______, KC_CAPS, _______, TR_CCED, _______, TR_HASH, _______, _______, _______, _______, _______, @@ -183,7 +183,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ╰───────┴────────╯ - [_FNL] = LAYOUT( + [_FNL] = LAYOUT_split_3x5_3( _______, _______, _______, _______, _______, _______, _______, TR_UDIA, _______, TR_COLN, _______, _______, _______, _______, _______, _______, _______, S(TR_I), TR_I, TR_ODIA, _______, _______, _______, _______, _______, _______, _______, TR_CIRC, TR_TILD, TR_QUES, @@ -204,7 +204,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ╰───────┴────────╯ - [_ARROW] = LAYOUT( + [_ARROW] = LAYOUT_split_3x5_3( _______, _______, _______, _______, _______, KC_MPRV, KC_PGUP, KC_UP, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, _______, _______, _______, _______, KC_MNXT, KC_PGDN, _______, KC_VOLD, KC_VOLU, @@ -227,7 +227,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ╰───────┴────────╯ - [_ADJUST] = LAYOUT( + [_ADJUST] = LAYOUT_split_3x5_3( RGB_VAI, RGB_SAI, RGB_HUI, RGB_MOD, RGB_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_SAD, RGB_HUD, RGB_RMOD, XXXXXXX, BALL_HUI, BALL_WHT, BALL_DEC, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN2, KC_BTN1, BALL_SCR, QK_RBT, QK_BOOT, EE_CLR, XXXXXXX, XXXXXXX, diff --git a/skywatch/keymaps/vial/keymap.c b/skywatch/keymaps/vial/keymap.c index 25531e8..99f6522 100644 --- a/skywatch/keymaps/vial/keymap.c +++ b/skywatch/keymaps/vial/keymap.c @@ -55,7 +55,7 @@ enum skywatch_layer { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT( + [_QWERTY] = LAYOUT_split_3x5_3( KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, LGUI_T(KC_A), LALT_T(KC_S), LCTL_T(KC_D), LSFT_T(KC_F), KC_G, KC_H, LSFT_T(KC_J), LCTL_T(KC_K), LALT_T(KC_L), LGUI_T(KC_QUOT), LT(BUTTON,KC_Z), ALGR_T(KC_X), KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, ALGR_T(KC_DOT), LT(BUTTON,KC_SLSH), @@ -64,14 +64,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_MEDIA] = LAYOUT( + [_MEDIA] = LAYOUT_split_3x5_3( QK_BOOT, QK_RBT, EE_CLR, KC_NO, KC_NO, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, U_NA, U_NU, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, U_NA, KC_ALGR, U_NA, U_NA, U_NA, U_NU, U_NU, U_NU, U_NU, U_NU, U_NA, U_NA, U_NA, KC_MSTP, KC_MPLY, KC_MUTE ), - [_NAV] = LAYOUT( + [_NAV] = LAYOUT_split_3x5_3( U_NA, U_NA, U_NA, U_NA, U_NA, U_RDO, U_PST, U_CPY, U_CUT, U_UND, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, U_NA, CW_TOGG, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, U_NA, KC_ALGR, U_NA, U_NA, U_NA, KC_INS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, @@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), - [_MOUSE] = LAYOUT( + [_MOUSE] = LAYOUT_split_3x5_3( U_NA, U_NA, U_NA, U_NA, U_NA, U_RDO, U_PST, U_CPY, U_CUT, U_UND, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, U_NA, U_NU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, U_NA, KC_ALGR, U_NA, U_NA, U_NA, U_NU, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, @@ -87,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), - [_SYM] = LAYOUT( + [_SYM] = LAYOUT_split_3x5_3( KC_LCBR, KC_AMPR, KC_ASTR, KC_LPRN, KC_RCBR, U_NA, U_NA, U_NA, U_NA, U_NA, KC_COLN, KC_DLR, KC_PERC, KC_CIRC, KC_PLUS, U_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, U_NA, U_NA, U_NA, KC_ALGR, U_NA, @@ -95,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), - [_NUM] = LAYOUT( + [_NUM] = LAYOUT_split_3x5_3( KC_LBRC, KC_7, KC_8, KC_9, KC_RBRC, U_NA, U_NA, U_NA, U_NA, U_NA, KC_SCLN, KC_4, KC_5, KC_6, KC_EQL, U_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS, U_NA, U_NA, U_NA, KC_ALGR, U_NA, @@ -104,14 +104,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), - [_FUN] = LAYOUT( + [_FUN] = LAYOUT_split_3x5_3( KC_F12, KC_F7, KC_F8, KC_F9, KC_PSCR, U_NA, U_NA, U_NA, U_NA, U_NA, KC_F11, KC_F4, KC_F5, KC_F6, KC_SCRL, U_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, KC_F10, KC_F1, KC_F2, KC_F3, KC_PAUS, U_NA, U_NA, U_NA, KC_ALGR, U_NA, KC_APP, KC_SPC, KC_TAB, U_NA, U_NA, U_NA ), - [_BUTTON] = LAYOUT( + [_BUTTON] = LAYOUT_split_3x5_3( U_UND, U_CUT, U_CPY, U_PST, U_RDO, U_RDO, U_PST, U_CPY, U_CUT, U_UND, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, U_NU, U_NU, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, U_UND, U_CUT, U_CPY, U_PST, U_RDO, U_RDO, U_PST, U_CPY, U_CUT, U_UND, From fbd9a045900f1dea85aa8e5afd3364c3aeb4e2f9 Mon Sep 17 00:00:00 2001 From: Duncan Sutherland Date: Sun, 15 Oct 2023 17:54:39 +0100 Subject: [PATCH 3/3] Update info.json remove `layout_aliases` --- skywatch/info.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/skywatch/info.json b/skywatch/info.json index d8983fb..435dfe6 100644 --- a/skywatch/info.json +++ b/skywatch/info.json @@ -51,9 +51,6 @@ "processor": "RP2040", "bootloader": "rp2040", "board": "GENERIC_RP_RP2040", - "layout_aliases": { - "LAYOUT_reviung41": "LAYOUT" - }, "community_layouts": ["split_3x5_3"], "layouts": { "LAYOUT_split_3x5_3": {