Skip to content

Commit

Permalink
Fix pre-commit issues
Browse files Browse the repository at this point in the history
  • Loading branch information
allymparker committed Nov 21, 2023
1 parent 49ca9b1 commit c630f6b
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 155 deletions.
20 changes: 10 additions & 10 deletions app/boards/arm/corneish_zen/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 5 additions & 5 deletions app/boards/arm/corneish_zen/custom_status_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
68 changes: 23 additions & 45 deletions app/boards/arm/corneish_zen/widgets/icons/lpkblogo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, 0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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,
};
60 changes: 19 additions & 41 deletions app/boards/arm/corneish_zen/widgets/icons/miryokulogo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
75 changes: 25 additions & 50 deletions app/boards/arm/corneish_zen/widgets/icons/zmklogo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
4 changes: 2 additions & 2 deletions app/src/activity.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 5 additions & 2 deletions app/src/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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); };

Expand Down

0 comments on commit c630f6b

Please sign in to comment.