From 99c784680a0360def81e5b07e6eeb8e1a7d11635 Mon Sep 17 00:00:00 2001 From: Alaa Saad Mansour Date: Tue, 10 Sep 2024 23:54:58 +0200 Subject: [PATCH] Add bird layout to try. --- config/base30.keymap | 73 +++++++++++++++++++-- config/boards/shields/ghazal/ghazal.overlay | 4 +- config/combos30.dtsi | 32 +++++---- 3 files changed, 89 insertions(+), 20 deletions(-) diff --git a/config/base30.keymap b/config/base30.keymap index 52b88751..970a9eb6 100644 --- a/config/base30.keymap +++ b/config/base30.keymap @@ -10,14 +10,16 @@ #include #define MAC 0 -#define NAV 1 -#define SYM 2 -#define WIN 3 -#define NAVW 4 -#define SYMW 5 +#define MBIRD 1 +#define NAV 2 +#define SYM 3 +#define WIN 4 +#define WBIRD 5 +#define NAVW 6 +#define SYMW 7 #ifdef GHAZAL - #define SCROLL 6 - #define SNIPE 7 + #define SCROLL 8 + #define SNIPE 9 #endif #define SK(KEY) &nk KEY KEY @@ -122,6 +124,34 @@ #endif }; + bird_mac { + label = "MBIRD"; + bindings = < +// ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ + &kp X &kp C &kp L &kp F &kp P &kp K &kp Y &kp O &kp U &kp SQT + &kp R &kp S &kp N &kp T &kp B &kp J &kp H &kp E &kp I &kp A + &kp W &kp M &kp G &kp D &kp COMMA &kp DOT +// ╰─────────────┴─────────────┼─────────────┤ ├─────────────┼─────────────┴─────────────╯ + ¯o_nav &kp SPACE &skq LSHIFT ¯o_sym +// ╰─────────────┴─────────────╯ ╰─────────────┴─────────────╯ + + #ifdef WASFOORA + // up left down right middle + &kp C_VOL_UP &kp C_VOL_DN &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE + #endif + + #ifdef GHAZAL + SL(SCROLL) + &mkp MCLK &mkp LCLK &mkp RCLK + &mkp MCLK &mkp LCLK SL(SCROLL) &mkp RCLK &mo SNIPE &kp C_VOL_UP &kp C_VOL_DN &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE + #endif + + >; + #ifdef ENCODERS + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; + #endif + }; + navigation { label = "NAV"; bindings = < @@ -205,6 +235,35 @@ sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp PG_UP PG_DN>; #endif }; + + + bird_windows { + label = "WBIRD"; + bindings = < +// ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ + &kp X &kp C &kp L &kp F &kp P &kp K &kp Y &kp O &kp U &kp SQT + &kp R &kp S &kp N &kp T &kp B &kp J &kp H &kp E &kp I &kp A + &kp W &kp M &kp G &kp D &kp COMMA &kp DOT +// ╰─────────────┴─────────────┼─────────────┤ ├─────────────┼─────────────┴─────────────╯ + ¯o_navW &kp SPACE &skq LSHIFT ¯o_symW +// ╰─────────────┴─────────────╯ ╰─────────────┴─────────────╯ + + #ifdef WASFOORA + // up left down right middle + &kp C_VOL_UP &kp C_VOL_DN &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE + #endif + + #ifdef GHAZAL + SL(SCROLL) + &mkp MCLK &mkp LCLK &mkp RCLK + &mkp MCLK &mkp LCLK SL(SCROLL) &mkp RCLK &mo SNIPE &kp C_VOL_UP &kp C_VOL_DN &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE + #endif + + >; + #ifdef ENCODERS + sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp PG_UP PG_DN>; + #endif + }; navigation_windows { label = "NAVW"; diff --git a/config/boards/shields/ghazal/ghazal.overlay b/config/boards/shields/ghazal/ghazal.overlay index e9bb6699..4a62d844 100644 --- a/config/boards/shields/ghazal/ghazal.overlay +++ b/config/boards/shields/ghazal/ghazal.overlay @@ -68,8 +68,8 @@ nice_view_spi: &spi1 { irq-gpios = <&gpio0 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* optional features */ - snipe-layers = <2 5 7>; - scroll-layers = <6>; + snipe-layers = <3 7 9>; + scroll-layers = <8>; // automouse-layer = <4>; }; }; diff --git a/config/combos30.dtsi b/config/combos30.dtsi index 081967cc..632e021c 100644 --- a/config/combos30.dtsi +++ b/config/combos30.dtsi @@ -25,19 +25,25 @@ compatible = "zmk,combos"; }; #ifdef GHAZAL - #define ALPHA_ALL MAC WIN SCROLL SNIPE - #define ALPHA_MAC MAC SCROLL SNIPE - #define ALPHA_WIN WIN SCROLL SNIPE + #define ALPHA_ALL MAC WIN SCROLL SNIPE MBIRD WBIRD + #define ALPHA_MAC MAC SCROLL SNIPE MBIRD + #define ALPHA_WIN WIN SCROLL SNIPE WBIRD #else - #define ALPHA_ALL MAC WIN - #define ALPHA_MAC MAC - #define ALPHA_WIN WIN + #define ALPHA_ALL MAC WIN MBIRD WBIRD + #define ALPHA_MAC MAC MBIRD + #define ALPHA_WIN WIN WBIRD #endif /* Missing Alphas */ -COMBO(Q, &kp Q, 21 22, ALPHA_ALL ) // Q -COMBO(Z, &kp Z, 1 2, ALPHA_ALL) // Z -COMBO(V, &kp V, 20 21, ALPHA_ALL) // V +/* Hands down */ +COMBO(Q, &kp Q, 21 22, MAC WIN) // Q +COMBO(Z, &kp Z, 1 2, MAC WIN) // Z +COMBO(V, &kp V, 20 21, MAC WIN) // V + +/* BIRD */ +COMBO(BQ, &kp Q, 2 3, MBIRD WBIRD) // Q +COMBO(BZ, &kp Z, 20 21, MBIRD WBIRD) // Z +COMBO(BV, &kp V, 1 2, MBIRD WBIRD) // V /* Brackets */ COMBO(left_bracket, &kp LBKT, 1 11, ALPHA_ALL) @@ -97,8 +103,12 @@ COMBO(bt_2, &bt BT_SEL 2, 2 3, NAV NAVW) COMBO(bt_3, &bt BT_SEL 3, 3 4, NAV NAVW) /* mac | win */ -GCOMBO(switch_to_MAC_mac, &to MAC, 0 10 26) -GCOMBO(switch_to_MAC_win, &to WIN, 9 19 29) +GCOMBO(switch_to_mac, &to MAC, 0 10 26) +GCOMBO(switch_to_win, &to WIN, 9 19 29) + +/* BIRD: mac | win */ +GCOMBO(switch_to_mbird, &to MBIRD, 1 11 26) +GCOMBO(switch_to_wbird, &to WBIRD, 8 18 29) /* bluetooth profile + default layer */ COMBO(btblMAC, ¯o_btblwin, 27 20 21, ALPHA_ALL)