Skip to content

Commit

Permalink
Add bird layout to try.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlaaSaadAbdo authored Sep 10, 2024
1 parent 35943d0 commit 99c7846
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 20 deletions.
73 changes: 66 additions & 7 deletions config/base30.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@
#include <dt-bindings/zmk/outputs.h>

#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
Expand Down Expand Up @@ -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
// ╰─────────────┴─────────────┼─────────────┤ ├─────────────┼─────────────┴─────────────╯
&macro_nav &kp SPACE &skq LSHIFT &macro_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 = <
Expand Down Expand Up @@ -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
// ╰─────────────┴─────────────┼─────────────┤ ├─────────────┼─────────────┴─────────────╯
&macro_navW &kp SPACE &skq LSHIFT &macro_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";
Expand Down
4 changes: 2 additions & 2 deletions config/boards/shields/ghazal/ghazal.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
};
};
Expand Down
32 changes: 21 additions & 11 deletions config/combos30.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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, &macro_btblwin, 27 20 21, ALPHA_ALL)
Expand Down

0 comments on commit 99c7846

Please sign in to comment.