diff --git a/INSTALL.md b/INSTALL.md index 24d3889..37d08de 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -11,3 +11,43 @@ 5. Go to System Settings > Keyboard Layouts 6. Click the + button, and search for Graphite + +# Linux + +## If you don´t have any other user layouts + +If you don´t have any other user layouts installed under `$HOME/.config/xkb`, copy the contents of `xkb` to `$HOME/.config/xkb`. +## If you have other user variants intalled for the `us` layout + +1. Backup the contents of your `.config/xkb` directory, just in case. + +2. Add the following to the `` tag to the `$HOME/.config/xkb/evdev.xml`: +```xml + + + us + + + + + graphite + graphite + English (Graphite) + + + + + graphite-intl + graphite-intl + English (Colemak intl.) + + + + +``` + +3. Append the contents of `xkb/symbols/us` to `$HOME/.config/xkb/symbols/us`: +```bash +# Assuming you are at the repo root directory +$ cat xkb/symbols/us >> $HOME/.config/xkb/us +``` \ No newline at end of file diff --git a/xkb/rules/evdev b/xkb/rules/evdev new file mode 100644 index 0000000..52b5af9 --- /dev/null +++ b/xkb/rules/evdev @@ -0,0 +1,6 @@ +// generated by xkblayout templates + +// Note: no rules file entries are required for for a custom layout + +// Include the system 'evdev' file +! include %S/evdev diff --git a/xkb/rules/evdev.xml b/xkb/rules/evdev.xml new file mode 100644 index 0000000..6a673cd --- /dev/null +++ b/xkb/rules/evdev.xml @@ -0,0 +1,34 @@ + + + + + + + + + us + us + us + + + + + + graphite + graphite + English (Graphite) + + + + + graphite-intl + graphite + English (Graphite, Colemak intl.) + + + + + + + + \ No newline at end of file diff --git a/xkb/symbols/us b/xkb/symbols/us new file mode 100644 index 0000000..23da1a7 --- /dev/null +++ b/xkb/symbols/us @@ -0,0 +1,102 @@ +// Graphite variant for US keyboard layout +// Author: Richard Davison, 2023 +// Source: https://github.com/rdavison/graphite-layout +// +// ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┲━━━━━━━━━┓ +// │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ { │ } ┃Backspace┃ +// │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ [ │ ] ┃ ⌫ ┃ +// ┢━━━━━┷━┱───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┺━┳━━━━━━━┫ +// ┃Tab ┃ B │ L │ D │ W │ Z │ _ │ F │ O │ U │ J │ : │ + ┃ | ┃ +// ┃ ┃ b │ l │ d │ w │ z │ ' │ f │ o │ u │ j │ ; │ = ┃ \ ┃ +// ┣━━━━━━━┻┱────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┳━━━━┻━━━━━━━┫ +// ┃Caps ┃ N │ R │ T │ S │ G │ Y │ H │ A │ E │ I │ ? ┃ ⏎ ┃ +// ┃Lock ⇬ ┃ n │ r │ t │ s │ g │ y │ h │ a │ e │ i │ , ┃ Enter ┃ +// ┣━━━━━━━━┻━━━┱─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┲━┻━━━━━━━━━━━━┫ +// ┃Shift ┃ Q │ X │ M │ C │ V │ K │ P │ > │ " │ < ┃Shift ┃ +// ┃ ⇧ ┃ q │ x │ m │ c │ v │ k │ p │ . │ - │ / ┃ ⇧ ┃ +// ┣━━━━━━━┳━━━━┻━━┳━━┷━━━━┱┴─────┴─────┴─────┴─────┴─────┴────┲┷━━━━━╈━━━━━┻┳━━━━━━┳━━━━━━┫ +// ┃Ctrl ┃ Super ┃Alt ┃ ␣ Space ┃AltGr ┃Multi ┃ Ctxt ┃ Ctrl ┃ +// ┃ ┃ ┃ ┃ ┃ ┃ ┃ Menu ┃ ┃ +// ┗━━━━━━━┻━━━━━━━┻━━━━━━━┹───────────────────────────────────┺━━━━━━┻━━━━━━┻━━━━━━┻━━━━━━┛ + +xkb_symbols "graphite" { + include "us(basic)" + name[Group1]= "English (Graphite)"; + + + + key { [ bracketleft, braceleft ] }; + key { [ bracketright, braceright ] }; + + key { [ b, B ] }; + key { [ l, L ] }; + key { [ d, D ] }; + key { [ w, W ] }; + key { [ z, Z ] }; + key { [ apostrophe, underscore ] }; + key { [ f, F ] }; + key { [ o, O ] }; + key { [ u, U ] }; + key { [ j, J ] }; + key { [ semicolon, colon ] }; + key { [ equal, plus ] }; + + key { [ n, N ] }; + key { [ r, R ] }; + key { [ t, T ] }; + key { [ s, S ] }; + key { [ g, G ] }; + key { [ y, Y ] }; + key { [ h, H ] }; + key { [ a, A ] }; + key { [ e, E ] }; + key { [ i, I ] }; + key { [ comma, question ] }; + + key { [ q, Q ] }; + key { [ x, X ] }; + key { [ m, M ] }; + key { [ c, C ] }; + key { [ v, V ] }; + key { [ k, K ] }; + key { [ p, P ] }; + key { [ period, greater ] }; + key { [ minus, quotedbl ] }; + key { [ slash, less ] }; +}; + +// This variant uses the some of the MultiLingual Support as defined by Colemak +// https://colemak.com/Multilingual +xkb_symbols "graphite-intl" { + + include "us(graphite)" + name[Group1]= "English (Graphite, Colemak intl.)"; + + key { [ 2, at, masculine, twosuperior ] }; + key { [ 3, numbersign, ordfeminine, threesuperior ] }; + + key { [ b, B, dead_breve ] }; + key { [ d, D, dead_diaeresis ] }; + key { [ f, F, atilde, Atilde ] }; + key { [ o, O, oacute, Oacute ] }; + key { [ u, U, uacute, Uacute ] }; + + key { [ n, N, dead_tilde ] }; + key { [ r, R, dead_grave ] }; + key { [ t, T, dead_acute, dead_doubleacute ] }; + key { [ g, G, dead_ogonek ] }; + key { [ h, H, dead_caron ] }; + key { [ a, A, aacute, Aacute ] }; + key { [ e, E, eacute, Eacute ] }; + key { [ i, I, iacute, Iacute ] }; + key { [ comma, question, dead_cedilla ] }; + + key { [ x, X, dead_circumflex ] }; + key { [ m, M, dead_macron ] }; + + key { [ c, C, ccedilla, Ccedilla ] }; + key { [ k, K, dead_ring ] }; + key { [ period, greater, dead_abovedot ] }; + include "level3(ralt_switch)" + +};