Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<layoutList>` tag to the `$HOME/.config/xkb/evdev.xml`:
```xml
<layout>
<configItem>
<name>us</name>
</configItem>
<variantList>
<variant>
<configItem>
<name>graphite</name>
<shortDescription>graphite</shortDescription>
<description>English (Graphite)</description>
</configItem>
</variant>
<variant>
<configItem>
<name>graphite-intl</name>
<shortDescription>graphite-intl</shortDescription>
<description>English (Colemak intl.)</description>
</configItem>
</variant>
</variantList>
</layout>
```

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
```
6 changes: 6 additions & 0 deletions xkb/rules/evdev
Original file line number Diff line number Diff line change
@@ -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
34 changes: 34 additions & 0 deletions xkb/rules/evdev.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xkbConfigRegistry SYSTEM "xkb.dtd">
<!-- generated by xkblayout -->
<xkbConfigRegistry version="1.1">

<layoutList>
<layout>
<configItem>
<name>us</name>
<shortDescription>us</shortDescription>
<description>us</description>
</configItem>

<variantList>
<variant>
<configItem>
<name>graphite</name>
<shortDescription>graphite</shortDescription>
<description>English (Graphite)</description>
</configItem>
</variant>
<variant>
<configItem>
<name>graphite-intl</name>
<shortDescription>graphite</shortDescription>
<description>English (Graphite, Colemak intl.)</description>
</configItem>
</variant>
</variantList>

</layout>
</layoutList>

</xkbConfigRegistry>
102 changes: 102 additions & 0 deletions xkb/symbols/us
Original file line number Diff line number Diff line change
@@ -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 <AE11> { [ bracketleft, braceleft ] };
key <AE12> { [ bracketright, braceright ] };

key <AD01> { [ b, B ] };
key <AD02> { [ l, L ] };
key <AD03> { [ d, D ] };
key <AD04> { [ w, W ] };
key <AD05> { [ z, Z ] };
key <AD06> { [ apostrophe, underscore ] };
key <AD07> { [ f, F ] };
key <AD08> { [ o, O ] };
key <AD09> { [ u, U ] };
key <AD10> { [ j, J ] };
key <AD11> { [ semicolon, colon ] };
key <AD12> { [ equal, plus ] };

key <AC01> { [ n, N ] };
key <AC02> { [ r, R ] };
key <AC03> { [ t, T ] };
key <AC04> { [ s, S ] };
key <AC05> { [ g, G ] };
key <AC06> { [ y, Y ] };
key <AC07> { [ h, H ] };
key <AC08> { [ a, A ] };
key <AC09> { [ e, E ] };
key <AC10> { [ i, I ] };
key <AC11> { [ comma, question ] };

key <AB01> { [ q, Q ] };
key <AB02> { [ x, X ] };
key <AB03> { [ m, M ] };
key <AB04> { [ c, C ] };
key <AB05> { [ v, V ] };
key <AB06> { [ k, K ] };
key <AB07> { [ p, P ] };
key <AB08> { [ period, greater ] };
key <AB09> { [ minus, quotedbl ] };
key <AB10> { [ 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 <AE02> { [ 2, at, masculine, twosuperior ] };
key <AE03> { [ 3, numbersign, ordfeminine, threesuperior ] };

key <AD01> { [ b, B, dead_breve ] };
key <AD03> { [ d, D, dead_diaeresis ] };
key <AD07> { [ f, F, atilde, Atilde ] };
key <AD08> { [ o, O, oacute, Oacute ] };
key <AD09> { [ u, U, uacute, Uacute ] };

key <AC01> { [ n, N, dead_tilde ] };
key <AC02> { [ r, R, dead_grave ] };
key <AC03> { [ t, T, dead_acute, dead_doubleacute ] };
key <AC05> { [ g, G, dead_ogonek ] };
key <AC07> { [ h, H, dead_caron ] };
key <AC08> { [ a, A, aacute, Aacute ] };
key <AC09> { [ e, E, eacute, Eacute ] };
key <AC10> { [ i, I, iacute, Iacute ] };
key <AC11> { [ comma, question, dead_cedilla ] };

key <AB02> { [ x, X, dead_circumflex ] };
key <AB03> { [ m, M, dead_macron ] };

key <AB04> { [ c, C, ccedilla, Ccedilla ] };
key <AB06> { [ k, K, dead_ring ] };
key <AB08> { [ period, greater, dead_abovedot ] };
include "level3(ralt_switch)"

};