diff --git a/app/boards/arm/corneish_zen/Kconfig.defconfig b/app/boards/arm/corneish_zen/Kconfig.defconfig index 4ee79a70e2e..3db265af50f 100644 --- a/app/boards/arm/corneish_zen/Kconfig.defconfig +++ b/app/boards/arm/corneish_zen/Kconfig.defconfig @@ -72,22 +72,22 @@ menuconfig CUSTOM_WIDGET_PERIPHERAL_STATUS bool "custom peripheral status widget" config CUSTOM_WIDGET_LAYER_STATUS_HIDE_HEADING - bool "Hide heading strip for layer widget and center widgets on 1/3rds" + bool "Hide heading strip for layer widget and center widgets on 1/3rds" choice CUSTOM_WIDGET_LOGO_IMAGE - prompt "custom logo widget image" + prompt "custom logo widget image" - config CUSTOM_WIDGET_LOGO_IMAGE_ZEN - bool "Corne-ish Zen" + config CUSTOM_WIDGET_LOGO_IMAGE_ZEN + bool "Corne-ish Zen" - config CUSTOM_WIDGET_LOGO_IMAGE_LPKB - bool "LPKB" + config CUSTOM_WIDGET_LOGO_IMAGE_LPKB + bool "LPKB" - config CUSTOM_WIDGET_LOGO_IMAGE_ZMK - bool "ZMK" + config CUSTOM_WIDGET_LOGO_IMAGE_ZMK + bool "ZMK" - config CUSTOM_WIDGET_LOGO_IMAGE_MIRYOKU - bool "Miryoku" + config CUSTOM_WIDGET_LOGO_IMAGE_MIRYOKU + bool "Miryoku" endchoice diff --git a/app/boards/arm/corneish_zen/custom_status_screen.c b/app/boards/arm/corneish_zen/custom_status_screen.c index 766288b8cc3..19b0c21b5c6 100644 --- a/app/boards/arm/corneish_zen/custom_status_screen.c +++ b/app/boards/arm/corneish_zen/custom_status_screen.c @@ -87,19 +87,19 @@ lv_obj_t *zmk_display_status_screen() { #if !IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) lv_obj_t *zenlogo_icon; zenlogo_icon = lv_img_create(screen); - #if IS_ENABLED(CONFIG_CUSTOM_WIDGET_LOGO_IMAGE_ZEN) +#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_LOGO_IMAGE_ZEN) LV_IMG_DECLARE(zenlogo); lv_img_set_src(zenlogo_icon, &zenlogo); - #elif IS_ENABLED(CONFIG_CUSTOM_WIDGET_LOGO_IMAGE_LPKB) +#elif IS_ENABLED(CONFIG_CUSTOM_WIDGET_LOGO_IMAGE_LPKB) LV_IMG_DECLARE(lpkblogo); lv_img_set_src(zenlogo_icon, &lpkblogo); - #elif IS_ENABLED(CONFIG_CUSTOM_WIDGET_LOGO_IMAGE_ZMK) +#elif IS_ENABLED(CONFIG_CUSTOM_WIDGET_LOGO_IMAGE_ZMK) LV_IMG_DECLARE(zmklogo); lv_img_set_src(zenlogo_icon, &zmklogo); - #elif IS_ENABLED(CONFIG_CUSTOM_WIDGET_LOGO_IMAGE_MIRYOKU) +#elif IS_ENABLED(CONFIG_CUSTOM_WIDGET_LOGO_IMAGE_MIRYOKU) LV_IMG_DECLARE(miryokulogo); lv_img_set_src(zenlogo_icon, &miryokulogo); - #endif +#endif #if IS_ENABLED(CONFIG_CUSTOM_WIDGET_LAYER_STATUS_HIDE_HEADING) lv_obj_align(zenlogo_icon, LV_ALIGN_CENTER, 0, 43); #else diff --git a/app/boards/arm/corneish_zen/widgets/icons/lpkblogo.c b/app/boards/arm/corneish_zen/widgets/icons/lpkblogo.c index 6998127b9fb..7809ce20142 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/lpkblogo.c +++ b/app/boards/arm/corneish_zen/widgets/icons/lpkblogo.c @@ -15,53 +15,31 @@ #define LV_ATTRIBUTE_IMG_LPKBLOGO #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_LPKBLOGO uint8_t lpkblogo_map[] = { - 0xff, 0xff, 0xff, 0xff, /*Color of index 0*/ - 0x00, 0x00, 0x00, 0xff, /*Color of index 1*/ +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_LPKBLOGO uint8_t + lpkblogo_map[] = { + 0xff, 0xff, 0xff, 0xff, /*Color of index 0*/ + 0x00, 0x00, 0x00, 0xff, /*Color of index 1*/ - 0x7f, 0xff, 0xff, 0xff, 0xc0, - 0xff, 0xff, 0xff, 0xff, 0xe0, - 0xe0, 0x00, 0x00, 0x00, 0xe0, - 0xc0, 0x00, 0x00, 0x00, 0x60, - 0xc7, 0x83, 0xff, 0xfc, 0x60, - 0xcf, 0xc7, 0xff, 0xfc, 0x60, - 0xcf, 0xc7, 0xff, 0xfc, 0x60, - 0xcf, 0xc7, 0xff, 0xfc, 0x60, - 0xcf, 0xc7, 0xff, 0xfc, 0x60, - 0xcf, 0xc3, 0xff, 0xfc, 0x60, - 0xcf, 0xc0, 0x00, 0xfc, 0x60, - 0xcf, 0xc0, 0x00, 0xfc, 0x60, - 0xcf, 0xc0, 0x00, 0xfc, 0x60, - 0xcf, 0xc0, 0x00, 0xfc, 0x60, - 0xcf, 0xc3, 0xff, 0xfc, 0x60, - 0xcf, 0xc7, 0xff, 0xfc, 0x60, - 0xcf, 0xc7, 0xff, 0xfc, 0x60, - 0xcf, 0xc7, 0xff, 0xfc, 0x60, - 0xcf, 0xc7, 0xff, 0xfc, 0x60, - 0xcf, 0xc3, 0xff, 0xfc, 0x60, - 0xcf, 0xc0, 0x00, 0x00, 0x60, - 0xcf, 0xc0, 0x00, 0x00, 0x60, - 0xcf, 0xc0, 0x00, 0x00, 0x60, - 0xcf, 0xc0, 0x00, 0x00, 0x60, - 0xcf, 0xc0, 0x00, 0x00, 0x60, - 0xcf, 0xc3, 0xff, 0xf8, 0x60, - 0xcf, 0xc7, 0xff, 0xfc, 0x60, - 0xcf, 0xc7, 0xff, 0xfc, 0x60, - 0xcf, 0xc7, 0xff, 0xfc, 0x60, - 0xcf, 0xc7, 0xff, 0xfc, 0x60, - 0xc7, 0x83, 0xff, 0xf8, 0x60, - 0xc0, 0x00, 0x00, 0x00, 0x60, - 0xe0, 0x00, 0x00, 0x00, 0xe0, - 0xff, 0xff, 0xff, 0xff, 0xe0, - 0x7f, 0xff, 0xff, 0xff, 0xc0, + 0x7f, 0xff, 0xff, 0xff, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0xe0, + 0xc0, 0x00, 0x00, 0x00, 0x60, 0xc7, 0x83, 0xff, 0xfc, 0x60, 0xcf, 0xc7, 0xff, 0xfc, 0x60, + 0xcf, 0xc7, 0xff, 0xfc, 0x60, 0xcf, 0xc7, 0xff, 0xfc, 0x60, 0xcf, 0xc7, 0xff, 0xfc, 0x60, + 0xcf, 0xc3, 0xff, 0xfc, 0x60, 0xcf, 0xc0, 0x00, 0xfc, 0x60, 0xcf, 0xc0, 0x00, 0xfc, 0x60, + 0xcf, 0xc0, 0x00, 0xfc, 0x60, 0xcf, 0xc0, 0x00, 0xfc, 0x60, 0xcf, 0xc3, 0xff, 0xfc, 0x60, + 0xcf, 0xc7, 0xff, 0xfc, 0x60, 0xcf, 0xc7, 0xff, 0xfc, 0x60, 0xcf, 0xc7, 0xff, 0xfc, 0x60, + 0xcf, 0xc7, 0xff, 0xfc, 0x60, 0xcf, 0xc3, 0xff, 0xfc, 0x60, 0xcf, 0xc0, 0x00, 0x00, 0x60, + 0xcf, 0xc0, 0x00, 0x00, 0x60, 0xcf, 0xc0, 0x00, 0x00, 0x60, 0xcf, 0xc0, 0x00, 0x00, 0x60, + 0xcf, 0xc0, 0x00, 0x00, 0x60, 0xcf, 0xc3, 0xff, 0xf8, 0x60, 0xcf, 0xc7, 0xff, 0xfc, 0x60, + 0xcf, 0xc7, 0xff, 0xfc, 0x60, 0xcf, 0xc7, 0xff, 0xfc, 0x60, 0xcf, 0xc7, 0xff, 0xfc, 0x60, + 0xc7, 0x83, 0xff, 0xf8, 0x60, 0xc0, 0x00, 0x00, 0x00, 0x60, 0xe0, 0x00, 0x00, 0x00, 0xe0, + 0xff, 0xff, 0xff, 0xff, 0xe0, 0x7f, 0xff, 0xff, 0xff, 0xc0, }; const lv_img_dsc_t lpkblogo = { - .header.cf = LV_IMG_CF_INDEXED_1BIT, - .header.always_zero = 0, - .header.reserved = 0, - .header.w = 35, - .header.h = 35, - .data_size = 183, - .data = lpkblogo_map, + .header.cf = LV_IMG_CF_INDEXED_1BIT, + .header.always_zero = 0, + .header.reserved = 0, + .header.w = 35, + .header.h = 35, + .data_size = 183, + .data = lpkblogo_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/miryokulogo.c b/app/boards/arm/corneish_zen/widgets/icons/miryokulogo.c index 154f2d1e5fe..496d9f50415 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/miryokulogo.c +++ b/app/boards/arm/corneish_zen/widgets/icons/miryokulogo.c @@ -11,49 +11,27 @@ #define LV_ATTRIBUTE_IMG_MIRYOKULOGO #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_MIRYOKULOGO uint8_t miryokulogo_map[] = { - 0x04, 0x02, 0x04, 0xff, /*Color of index 0*/ - 0xfc, 0xfe, 0xfc, 0xff, /*Color of index 1*/ +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_MIRYOKULOGO uint8_t + miryokulogo_map[] = { + 0x04, 0x02, 0x04, 0xff, /*Color of index 0*/ + 0xfc, 0xfe, 0xfc, 0xff, /*Color of index 1*/ - 0xff, 0xff, 0xff, 0xff, - 0x80, 0x00, 0x00, 0x01, - 0x80, 0x00, 0x00, 0x01, - 0x9f, 0xff, 0xff, 0xf9, - 0x9f, 0xff, 0xff, 0xf9, - 0x98, 0x01, 0x99, 0x99, - 0x98, 0x01, 0x99, 0x99, - 0x99, 0x99, 0x80, 0x19, - 0x99, 0x99, 0x80, 0x19, - 0x98, 0x01, 0xf9, 0xf9, - 0x98, 0x01, 0xf9, 0xf9, - 0x99, 0x99, 0x99, 0x99, - 0x99, 0x99, 0x99, 0x99, - 0x98, 0x01, 0x80, 0x19, - 0x98, 0x01, 0x80, 0x19, - 0x9f, 0x9f, 0xf9, 0xf9, - 0x9f, 0x9f, 0xf9, 0xf9, - 0x98, 0x01, 0x80, 0x19, - 0x98, 0x01, 0x80, 0x19, - 0x99, 0x99, 0x99, 0x99, - 0x99, 0x99, 0x99, 0x99, - 0x99, 0x81, 0x99, 0x99, - 0x99, 0x81, 0x99, 0x99, - 0x99, 0x9f, 0x99, 0x99, - 0x99, 0x9f, 0x99, 0x99, - 0x99, 0x80, 0x19, 0x99, - 0x99, 0x80, 0x19, 0x99, - 0x9f, 0xff, 0xff, 0xf9, - 0x9f, 0xff, 0xff, 0xf9, - 0x80, 0x00, 0x00, 0x01, - 0x80, 0x00, 0x00, 0x01, - 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x01, 0x9f, 0xff, 0xff, + 0xf9, 0x9f, 0xff, 0xff, 0xf9, 0x98, 0x01, 0x99, 0x99, 0x98, 0x01, 0x99, 0x99, 0x99, 0x99, + 0x80, 0x19, 0x99, 0x99, 0x80, 0x19, 0x98, 0x01, 0xf9, 0xf9, 0x98, 0x01, 0xf9, 0xf9, 0x99, + 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x98, 0x01, 0x80, 0x19, 0x98, 0x01, 0x80, 0x19, + 0x9f, 0x9f, 0xf9, 0xf9, 0x9f, 0x9f, 0xf9, 0xf9, 0x98, 0x01, 0x80, 0x19, 0x98, 0x01, 0x80, + 0x19, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x81, 0x99, 0x99, 0x99, 0x81, + 0x99, 0x99, 0x99, 0x9f, 0x99, 0x99, 0x99, 0x9f, 0x99, 0x99, 0x99, 0x80, 0x19, 0x99, 0x99, + 0x80, 0x19, 0x99, 0x9f, 0xff, 0xff, 0xf9, 0x9f, 0xff, 0xff, 0xf9, 0x80, 0x00, 0x00, 0x01, + 0x80, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, }; const lv_img_dsc_t miryokulogo = { - .header.always_zero = 0, - .header.w = 32, - .header.h = 32, - .data_size = 136, - .header.cf = LV_IMG_CF_INDEXED_1BIT, - .data = miryokulogo_map, + .header.always_zero = 0, + .header.w = 32, + .header.h = 32, + .data_size = 136, + .header.cf = LV_IMG_CF_INDEXED_1BIT, + .data = miryokulogo_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/zmklogo.c b/app/boards/arm/corneish_zen/widgets/icons/zmklogo.c index 98c7a8adc5c..41cc7967c1e 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/zmklogo.c +++ b/app/boards/arm/corneish_zen/widgets/icons/zmklogo.c @@ -8,58 +8,33 @@ #define LV_ATTRIBUTE_IMG_ZMKLOGO #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_ZMKLOGO uint8_t zmklogo_map[] = { - 0xff, 0xff, 0xff, 0xff, /*Color of index 0*/ - 0x00, 0x00, 0x00, 0xfe, /*Color of index 1*/ +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_ZMKLOGO uint8_t + zmklogo_map[] = { + 0xff, 0xff, 0xff, 0xff, /*Color of index 0*/ + 0x00, 0x00, 0x00, 0xfe, /*Color of index 1*/ - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xf0, 0x0e, 0x7e, 0x73, 0xc7, - 0xe0, 0x04, 0x3c, 0x31, 0x87, - 0xf0, 0x0c, 0x18, 0x31, 0x0f, - 0xff, 0x0c, 0x18, 0x30, 0x1f, - 0xff, 0x1c, 0x00, 0x30, 0x3f, - 0xfe, 0x3c, 0x00, 0x30, 0x7f, - 0xfe, 0x3c, 0x42, 0x30, 0xff, - 0xfc, 0x7c, 0x66, 0x30, 0xff, - 0xf8, 0x7c, 0x7e, 0x30, 0x7f, - 0xf8, 0xfc, 0x7e, 0x30, 0x3f, - 0xf0, 0xfc, 0x7e, 0x30, 0x1f, - 0xf0, 0x0c, 0x7e, 0x31, 0x0f, - 0xe0, 0x04, 0x7e, 0x31, 0x87, - 0xf0, 0x0e, 0xff, 0x73, 0xc7, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x0e, 0x7e, 0x73, 0xc7, 0xe0, 0x04, 0x3c, 0x31, 0x87, + 0xf0, 0x0c, 0x18, 0x31, 0x0f, 0xff, 0x0c, 0x18, 0x30, 0x1f, 0xff, 0x1c, 0x00, 0x30, 0x3f, + 0xfe, 0x3c, 0x00, 0x30, 0x7f, 0xfe, 0x3c, 0x42, 0x30, 0xff, 0xfc, 0x7c, 0x66, 0x30, 0xff, + 0xf8, 0x7c, 0x7e, 0x30, 0x7f, 0xf8, 0xfc, 0x7e, 0x30, 0x3f, 0xf0, 0xfc, 0x7e, 0x30, 0x1f, + 0xf0, 0x0c, 0x7e, 0x31, 0x0f, 0xe0, 0x04, 0x7e, 0x31, 0x87, 0xf0, 0x0e, 0xff, 0x73, 0xc7, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, }; const lv_img_dsc_t zmklogo = { - .header.cf = LV_IMG_CF_INDEXED_1BIT, - .header.always_zero = 0, - .header.reserved = 0, - .header.w = 40, - .header.h = 40, - .data_size = 208, - .data = zmklogo_map, + .header.cf = LV_IMG_CF_INDEXED_1BIT, + .header.always_zero = 0, + .header.reserved = 0, + .header.w = 40, + .header.h = 40, + .data_size = 208, + .data = zmklogo_map, }; diff --git a/app/src/activity.c b/app/src/activity.c index 41fe2e15dc4..46af56fbd84 100644 --- a/app/src/activity.c +++ b/app/src/activity.c @@ -74,8 +74,8 @@ void activity_work_handler(struct k_work *work) { } else #endif /* IS_ENABLED(CONFIG_ZMK_SLEEP) */ if (inactive_time > MAX_IDLE_MS) { - set_state(ZMK_ACTIVITY_IDLE); - } + set_state(ZMK_ACTIVITY_IDLE); + } } K_WORK_DEFINE(activity_work, activity_work_handler); diff --git a/app/src/keymap.c b/app/src/keymap.c index f7cfabd03df..18dce60e4ee 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -116,7 +116,8 @@ bool zmk_keymap_layer_active(uint8_t layer) { }; bool zmk_keymap_layer_momentary(uint8_t layer) { - return layer != _zmk_keymap_layer_default && (_zmk_keymap_layer_momentary & (BIT(layer))) == (BIT(layer)); + return layer != _zmk_keymap_layer_default && + (_zmk_keymap_layer_momentary & (BIT(layer))) == (BIT(layer)); }; bool zmk_keymap_layers_any_momentary(zmk_keymap_layers_state_t layers_mask) { @@ -132,7 +133,9 @@ uint8_t zmk_keymap_highest_layer_active() { return zmk_keymap_layer_default(); } -int zmk_keymap_layer_activate(uint8_t layer, bool momentary) { return set_layer_state(layer, true, momentary); }; +int zmk_keymap_layer_activate(uint8_t layer, bool momentary) { + return set_layer_state(layer, true, momentary); +}; int zmk_keymap_layer_deactivate(uint8_t layer) { return set_layer_state(layer, false, false); };