Skip to content

Commit

Permalink
keymap-drawer: Improve style; use Nord theme
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSturgeon committed Sep 27, 2023
1 parent 95fae42 commit 911eeae
Showing 1 changed file with 80 additions and 10 deletions.
90 changes: 80 additions & 10 deletions config/keymap_drawer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,88 @@ draw_config:
shrink_wide_legends: 5
append_colon_to_layer_header: false
svg_extra_style: |
/* Traparent keys */
.trans, .none, .ghost {
opacity: 0.4;
/* Nord color scheme */
:root {
--dark1: #2e3440;
--dark2: #3b4252;
--dark3: #434c5e;
--dark4: #4c566a;
--light1: #d8dee9;
--light2: #e5e9f0;
--light3: #eceff4;
--blue1: #8fbcbb;
--blue2: #88c0d0;
--blue3: #81a1c1;
--blue4: #5e81ac;
--red: #bf616a;
--orange: #d08770;
--yellow: #ebcb8b;
--green: #a3be8c;
--purple: #b48ead;
}
.key rect {
stroke: var(--light3);
fill: var(--light3);
}
.tap {
fill: var(--dark1);
}
.info {
& .shifted, & .hold {
fill: var(--dark1)
}
}
/* Tweak hold/shift styles */
.shifted, .hold {
font-size: 18px;
text-anchor: middle;
fill: var(--blue4);
}
.shifted {
translate: -25px 2px;
dominant-baseline: hanging;
fill: rgb(96, 125, 139);
dominant-baseline: hanging;
text-anchor: end;
translate: 1.8em 0.5em;
}
.hold {
dominant-baseline: ideographic;
fill: rgb(96, 125, 139);
dominant-baseline: ideographic !important;
text-anchor: middle;
}
.trans, .none, .ghost {
opacity: 0.8!important;
& .tap {
fill: var(--blue2) !important;
}
}
/* Row 2,3,4 (alpha keys) */
.keypos-23, .keypos-24, .keypos-25, .keypos-26, .keypos-27, .keypos-28, .keypos-29, .keypos-30, .keypos-31, .keypos-32,
.keypos-35, .keypos-36, .keypos-37, .keypos-38, .keypos-39, .keypos-40, .keypos-41, .keypos-42, .keypos-43, .keypos-44,
.keypos-47, .keypos-48, .keypos-49, .keypos-50, .keypos-51, .keypos-58, .keypos-59, .keypos-60, .keypos-61, .keypos-62
{
& rect {
fill: var(--light1);
}
}
/* Home keys */
.keypos-35, .keypos-36, .keypos-37, .keypos-38, .keypos-41, .keypos-42, .keypos-43, .keypos-44
{
& rect {
stroke: var(--purple);
}
}
/* Thumb keys: */
.keypos-52, .keypos-53, .keypos-54, .keypos-55, .keypos-56, .keypos-57,
.keypos-69, .keypos-70, .keypos-71, .keypos-72, .keypos-73, .keypos-74
{
/* TODO? */
}
parse_config:
Expand All @@ -40,21 +104,27 @@ parse_config:
# Moergo behavior
'&magic 5 0': $$mdi:creation-outline$$
'&bt_0':
type: info
tap: $$mdi:bluetooth-connect$$
shifted: 0
'&bt_1':
type: info
tap: $$mdi:bluetooth-connect$$
shifted: 1
'&bt_2':
type: info
tap: $$mdi:bluetooth-connect$$
shifted: 2
'&bt_3':
type: info
tap: $$mdi:bluetooth-connect$$
shifted: 3
'&bt BT_CLR':
type: info
tap: $$mdi:bluetooth-off$$
hold: Clear
'&bt BT_CLR_ALL':
type: info
tap: $$mdi:bluetooth-off$$
hold: Clr All
'&out OUT_USB': $$mdi:usb$$
Expand Down

0 comments on commit 911eeae

Please sign in to comment.