Bring fox keyboard layout from upstream, remove rachel dependency. Split fox layout into one file for symbols, one for types, switch alt and alt-gr

This commit is contained in:
xenia 2024-06-23 22:46:52 +02:00
parent c5325866ec
commit 5a9932ad94
5 changed files with 79 additions and 237 deletions

View File

@ -1,28 +1,5 @@
{ {
"nodes": { "nodes": {
"agda": {
"inputs": {
"flake-utils": "flake-utils_6",
"nixpkgs": [
"rachel",
"nixpkgs"
]
},
"locked": {
"lastModified": 1701366566,
"narHash": "sha256-B8Jmjld0gGbkVO08GsovVqrUXCs8VfJ8UdM3sjHnzgM=",
"owner": "agda",
"repo": "agda",
"rev": "4293e0a94d15acac915ab9088b2ec028f78d14a9",
"type": "github"
},
"original": {
"owner": "agda",
"ref": "v2.6.4.1",
"repo": "agda",
"type": "github"
}
},
"ansi-utils": { "ansi-utils": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
@ -44,45 +21,6 @@
"url": "https://git@githug.xyz/xenia/ansi-utils" "url": "https://git@githug.xyz/xenia/ansi-utils"
} }
}, },
"cornelis": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils_7",
"nixpkgs": [
"rachel",
"nixpkgs"
]
},
"locked": {
"lastModified": 1712595875,
"narHash": "sha256-KaAhKeESwOQ0R0vxeAO/CDPiPimiemoARyr0uIVTQ4w=",
"owner": "isovector",
"repo": "cornelis",
"rev": "9d3347e7d8589a28bcdd283001367d60bacf6b05",
"type": "github"
},
"original": {
"owner": "isovector",
"repo": "cornelis",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -174,42 +112,9 @@
} }
}, },
"flake-utils_6": { "flake-utils_6": {
"locked": {
"lastModified": 1678901627,
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_7": {
"inputs": { "inputs": {
"systems": "systems_6" "systems": "systems_6"
}, },
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_8": {
"inputs": {
"systems": "systems_7"
},
"locked": { "locked": {
"lastModified": 1694529238, "lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
@ -224,9 +129,9 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_9": { "flake-utils_7": {
"inputs": { "inputs": {
"systems": "systems_8" "systems": "systems_7"
}, },
"locked": { "locked": {
"lastModified": 1694529238, "lastModified": 1694529238,
@ -263,28 +168,6 @@
"type": "github" "type": "github"
} }
}, },
"home-manager_2": {
"inputs": {
"nixpkgs": [
"rachel",
"nixpkgs"
]
},
"locked": {
"lastModified": 1712386041,
"narHash": "sha256-dA82pOMQNnCJMAsPG7AXG35VmCSMZsJHTFlTHizpKWQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "d6bb9f934f2870e5cbc5b94c79e9db22246141ff",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.11",
"repo": "home-manager",
"type": "github"
}
},
"kak": { "kak": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_2",
@ -365,22 +248,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": {
"locked": {
"lastModified": 1713297878,
"narHash": "sha256-hOkzkhLT59wR8VaMbh1ESjtZLbGi+XNaBN6h49SPqEc=",
"owner": "NixOs",
"repo": "nixpkgs",
"rev": "66adc1e47f8784803f2deb6cacd5e07264ec2d5c",
"type": "github"
},
"original": {
"owner": "NixOs",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1697009197, "lastModified": 1697009197,
@ -411,47 +278,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_4": {
"locked": {
"lastModified": 1711703276,
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"rachel": {
"inputs": {
"agda": "agda",
"cornelis": "cornelis",
"home-manager": "home-manager_2",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-unstable": "nixpkgs-unstable",
"ssbm-nix": "ssbm-nix"
},
"locked": {
"lastModified": 1717095319,
"narHash": "sha256-CdOAT2MhNtxLf0Ki4d/mT9jQQZaIOfrCBZXHwJRgWYg=",
"ref": "refs/heads/master",
"rev": "7f19d4efe9fc7977b85a1f51b396e63ff8102b87",
"revCount": 137,
"type": "git",
"url": "https://git@githug.xyz/rachel/nixos-config"
},
"original": {
"type": "git",
"url": "https://git@githug.xyz/rachel/nixos-config"
}
},
"root": { "root": {
"inputs": { "inputs": {
"ansi-utils": "ansi-utils", "ansi-utils": "ansi-utils",
@ -460,7 +286,6 @@
"kak-tree": "kak-tree", "kak-tree": "kak-tree",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
"rachel": "rachel",
"unambig-path": "unambig-path", "unambig-path": "unambig-path",
"unispect": "unispect" "unispect": "unispect"
} }
@ -484,41 +309,6 @@
"type": "github" "type": "github"
} }
}, },
"slippi-desktop": {
"flake": false,
"locked": {
"lastModified": 1711346593,
"narHash": "sha256-WWgGRT58w1a4UcEe924hqa4ZVodQtsbXC44aCOEj528=",
"owner": "project-slippi",
"repo": "slippi-desktop-app",
"rev": "02f3f007cd03c6e2b0da57db65c90646efc04a86",
"type": "github"
},
"original": {
"owner": "project-slippi",
"repo": "slippi-desktop-app",
"type": "github"
}
},
"ssbm-nix": {
"inputs": {
"nixpkgs": "nixpkgs_4",
"slippi-desktop": "slippi-desktop"
},
"locked": {
"lastModified": 1712071998,
"narHash": "sha256-k95NCkXJ61PGMFuqyMtfvP3yTLozED/7DkN+lBWK0gs=",
"owner": "lytedev",
"repo": "ssbm-nix",
"rev": "eff966a97287d1d86b189d59a14bf744d86836b0",
"type": "github"
},
"original": {
"owner": "lytedev",
"repo": "ssbm-nix",
"type": "github"
}
},
"systems": { "systems": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
@ -624,21 +414,6 @@
"type": "github" "type": "github"
} }
}, },
"systems_8": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tree-sitters": { "tree-sitters": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_5", "flake-utils": "flake-utils_5",
@ -660,7 +435,7 @@
}, },
"unambig-path": { "unambig-path": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_8", "flake-utils": "flake-utils_6",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
@ -681,7 +456,7 @@
}, },
"unispect": { "unispect": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_9", "flake-utils": "flake-utils_7",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]

View File

@ -33,13 +33,9 @@
url = "git+https://git@githug.xyz/xenia/unambig-path"; url = "git+https://git@githug.xyz/xenia/unambig-path";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
rachel = {
url = "git+https://git@githug.xyz/rachel/nixos-config";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { self, nixpkgs, home-manager, nix-darwin, kak, kak-tree, unispect, ansi-utils, unambig-path, rachel }: outputs = { self, nixpkgs, home-manager, nix-darwin, kak, kak-tree, unispect, ansi-utils, unambig-path }:
let let
xdg-runtime-dir = "/tmp/xdg-rt"; xdg-runtime-dir = "/tmp/xdg-rt";
@ -66,7 +62,7 @@
}; };
mkNixOsBase = opts: import ./nixos/base.nix (opts // { nixpkgs-flake = nixpkgs; }); mkNixOsBase = opts: import ./nixos/base.nix (opts // { nixpkgs-flake = nixpkgs; });
mkNixOsGraphical = opts: import ./nixos/graphical.nix (opts // { fox-layout = rachel.keyboardLayouts.fox; }); mkNixOsGraphical = opts: import ./nixos/graphical.nix opts;
mkNixOsNetworking = opts: import ./nixos/networking.nix opts; mkNixOsNetworking = opts: import ./nixos/networking.nix opts;
in { in {
homeConfigurations."xenia@Joe-Bidens-MacBook-Pro" = homeConfigurations."xenia@Joe-Bidens-MacBook-Pro" =

View File

@ -1,6 +1,5 @@
{ {
pkgs, pkgs,
fox-layout,
background-image ? "pan-wire-3.png", background-image ? "pan-wire-3.png",
... ...
}: }:
@ -29,7 +28,8 @@
extraLayouts.fox = { extraLayouts.fox = {
description = "Layout suitable to be used by a fox"; description = "Layout suitable to be used by a fox";
languages = ["se"]; languages = ["se"];
symbolsFile = fox-layout; symbolsFile = ./kblayouts/fox-symbols.xkb;
typesFile = ./kblayouts/fox-types.xkb;
}; };
}; };
}; };

View File

@ -0,0 +1,55 @@
xkb_symbols "fox" {
key <TLDE> {[ U1F408, U1F431, U1F408, U1F431 ]};
key <AE01> {[ 1, ampersand, VoidSymbol, VoidSymbol ]};
key <AE02> {[ 2, quotedbl, at, VoidSymbol ]};
key <AE03> {[ 3, numbersign, VoidSymbol, VoidSymbol ]};
key <AE04> {[ 4, dollar, VoidSymbol, VoidSymbol ]};
key <AE05> {[ 5, percent, infinity, VoidSymbol ]};
key <AE06> {[ 6, asciitilde, VoidSymbol, VoidSymbol ]};
key <AE07> {[ 7, notsign, U21D0, because ]};
key <AE08> {[ 8, U1F449, ifonlyif, U1F97A ]};
key <AE09> {[ 9, U1F448, implies, therefore ]};
key <AE10> {[ 0, equal, notequal, approximate ]};
key <AE11> {[ plus, asterisk, asciicircum, underscore ]};
key <AE12> {[ minus, slash, bar, backslash ]};
key <AD01> {[ aring, Aring, U1F4EE, Sinh_ng2 ]};
key <AD02> {[ odiaeresis, Odiaeresis, VoidSymbol, VoidSymbol ]};
key <AD03> {[ adiaeresis, Adiaeresis, VoidSymbol, VoidSymbol ]};
key <AD04> {[ p, P, VoidSymbol, VoidSymbol ]};
key <AD05> {[ y, Y, VoidSymbol, VoidSymbol ]};
key <AD06> {[ f, F, VoidSymbol, VoidSymbol ]};
key <AD07> {[ g, G, VoidSymbol, VoidSymbol ]};
key <AD08> {[ c, C, VoidSymbol, VoidSymbol ]};
key <AD09> {[ r, R, VoidSymbol, VoidSymbol ]};
key <AD10> {[ l, L, VoidSymbol, VoidSymbol ]};
key <AD11> {[ parenleft, less, bracketleft, braceleft ]};
key <AD12> {[ parenright, greater, bracketright, braceright ]};
key <AC01> {[ a, A, VoidSymbol, VoidSymbol ]};
key <AC02> {[ o, O, VoidSymbol, VoidSymbol ]};
key <AC03> {[ e, E, VoidSymbol, VoidSymbol ]};
key <AC04> {[ u, U, VoidSymbol, VoidSymbol ]};
key <AC05> {[ i, I, VoidSymbol, VoidSymbol ]};
key <AC06> {[ d, D, VoidSymbol, VoidSymbol ]};
key <AC07> {[ h, H, VoidSymbol, VoidSymbol ]};
key <AC08> {[ t, T, VoidSymbol, VoidSymbol ]};
key <AC09> {[ n, N, VoidSymbol, VoidSymbol ]};
key <AC10> {[ s, S, VoidSymbol, VoidSymbol ]};
key <AC11> {[ exclam, question, exclamdown, questiondown ]};
key <BKSL> {[ apostrophe, grave, emdash, VoidSymbol ]};
key <LSGT> {[ comma, semicolon, VoidSymbol, VoidSymbol ]};
key <AB01> {[ period, colon, comma, semicolon ]};
key <AB02> {[ q, Q, VoidSymbol, VoidSymbol ]};
key <AB03> {[ j, J, VoidSymbol, VoidSymbol ]};
key <AB04> {[ k, K, VoidSymbol, VoidSymbol ]};
key <AB05> {[ x, X, VoidSymbol, VoidSymbol ]};
key <AB06> {[ b, B, VoidSymbol, VoidSymbol ]};
key <AB07> {[ m, M, VoidSymbol, VoidSymbol ]};
key <AB08> {[ w, W, VoidSymbol, VoidSymbol ]};
key <AB09> {[ v, V, VoidSymbol, VoidSymbol ]};
key <AB10> {[ z, Z, VoidSymbol, VoidSymbol ]};
key <SPCE> {[ space, space, space, space ]};
};

View File

@ -0,0 +1,16 @@
xkb_types "noaltgr" {
virtual_modifiers Shift, Alt;
type "CTRL+ALT" {
modifiers = Shift + Alt;
map[None] = Level1;
map[Shift] = Level2;
map[Alt] = Level3;
map[Shift+Alt] = Level4;
level_name[Level1] = "Base";
level_name[Level2] = "Shift";
level_name[Level3] = "Alt";
level_name[Level4] = "Shift Alt";
};
};