From d28f6684f75e4d7c345e2810e7cfcca5318d436e Mon Sep 17 00:00:00 2001 From: Soispha Date: Sat, 23 Dec 2023 22:43:27 +0100 Subject: [PATCH] chore(treewide): Add license headers --- .envrc | 19 +++++++++++++++++++ Cargo.toml | 19 +++++++++++++++++++ cog.toml | 19 +++++++++++++++++++ flake.nix | 19 +++++++++++++++++++ src/error/mod.rs | 21 +++++++++++++++++++++ src/key_repr/key/crossterm.rs | 21 +++++++++++++++++++++ src/key_repr/key/mod.rs | 21 +++++++++++++++++++++ src/key_repr/key/parsing/mod.rs | 21 +++++++++++++++++++++ src/key_repr/key_representation.pest | 19 +++++++++++++++++++ src/key_repr/key_value/crossterm.rs | 21 +++++++++++++++++++++ src/key_repr/key_value/mod.rs | 21 +++++++++++++++++++++ src/key_repr/keys/mod.rs | 21 +++++++++++++++++++++ src/key_repr/mod.rs | 21 +++++++++++++++++++++ src/lib.rs | 21 +++++++++++++++++++++ src/trie.rs | 21 +++++++++++++++++++++ 15 files changed, 305 insertions(+) diff --git a/.envrc b/.envrc index 96eca6b..1bcd4c0 100644 --- a/.envrc +++ b/.envrc @@ -1,3 +1,22 @@ +# Copyright (C) 2023 The Trinitrix Project +# +# This file is part of the Keymaps crate for Trinitrix. +# +# Keymaps is free software: you can redistribute it and/or modify +# it under the terms of the Lesser GNU General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# and the Lesser GNU General Public License along with this program. +# If not, see . + + use flake || use nix watch_file flake.nix diff --git a/Cargo.toml b/Cargo.toml index 373cece..83d09b5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,22 @@ +# Copyright (C) 2023 The Trinitrix Project +# +# This file is part of the Keymaps crate for Trinitrix. +# +# Keymaps is free software: you can redistribute it and/or modify +# it under the terms of the Lesser GNU General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# and the Lesser GNU General Public License along with this program. +# If not, see . + + [package] name = "keymaps" version = "0.1.0" diff --git a/cog.toml b/cog.toml index 139c52e..d8e9b2c 100644 --- a/cog.toml +++ b/cog.toml @@ -1,3 +1,22 @@ +# Copyright (C) 2023 The Trinitrix Project +# +# This file is part of the Keymaps crate for Trinitrix. +# +# Keymaps is free software: you can redistribute it and/or modify +# it under the terms of the Lesser GNU General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# and the Lesser GNU General Public License along with this program. +# If not, see . + + tag_prefix = "v" branch_whitelist = [ "main" ] ignore_merge_commits = false diff --git a/flake.nix b/flake.nix index 6e458be..64215f3 100644 --- a/flake.nix +++ b/flake.nix @@ -1,3 +1,22 @@ +# Copyright (C) 2023 The Trinitrix Project +# +# This file is part of the Keymaps crate for Trinitrix. +# +# Keymaps is free software: you can redistribute it and/or modify +# it under the terms of the Lesser GNU General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# and the Lesser GNU General Public License along with this program. +# If not, see . + + # Copyright (C) 2023 The Trinitrix Project # # This file is part of the Trixy crate for Trinitrix. diff --git a/src/error/mod.rs b/src/error/mod.rs index a2baacb..83ed614 100644 --- a/src/error/mod.rs +++ b/src/error/mod.rs @@ -1,3 +1,24 @@ +/* +* Copyright (C) 2023 The Trinitrix Project +* +* This file is part of the Keymaps crate for Trinitrix. +* +* Keymaps is free software: you can redistribute it and/or modify +* it under the terms of the Lesser GNU General Public License as +* published by the Free Software Foundation, either version 3 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* and the Lesser GNU General Public License along with this program. +* If not, see . +*/ + + use std::{fmt::Display, num::ParseIntError}; use thiserror::Error; diff --git a/src/key_repr/key/crossterm.rs b/src/key_repr/key/crossterm.rs index d814d47..6e73766 100644 --- a/src/key_repr/key/crossterm.rs +++ b/src/key_repr/key/crossterm.rs @@ -1,3 +1,24 @@ +/* +* Copyright (C) 2023 The Trinitrix Project +* +* This file is part of the Keymaps crate for Trinitrix. +* +* Keymaps is free software: you can redistribute it and/or modify +* it under the terms of the Lesser GNU General Public License as +* published by the Free Software Foundation, either version 3 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* and the Lesser GNU General Public License along with this program. +* If not, see . +*/ + + use crossterm::event::{Event, KeyCode, KeyEvent, KeyEventKind, KeyEventState, KeyModifiers}; use crate::{error, key_repr::KeyValue}; diff --git a/src/key_repr/key/mod.rs b/src/key_repr/key/mod.rs index e1fae0a..277ca5b 100644 --- a/src/key_repr/key/mod.rs +++ b/src/key_repr/key/mod.rs @@ -1,3 +1,24 @@ +/* +* Copyright (C) 2023 The Trinitrix Project +* +* This file is part of the Keymaps crate for Trinitrix. +* +* Keymaps is free software: you can redistribute it and/or modify +* it under the terms of the Lesser GNU General Public License as +* published by the Free Software Foundation, either version 3 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* and the Lesser GNU General Public License along with this program. +* If not, see . +*/ + + #[cfg(feature = "crossterm")] mod crossterm; diff --git a/src/key_repr/key/parsing/mod.rs b/src/key_repr/key/parsing/mod.rs index 5d6b14a..7587f8b 100644 --- a/src/key_repr/key/parsing/mod.rs +++ b/src/key_repr/key/parsing/mod.rs @@ -1,3 +1,24 @@ +/* +* Copyright (C) 2023 The Trinitrix Project +* +* This file is part of the Keymaps crate for Trinitrix. +* +* Keymaps is free software: you can redistribute it and/or modify +* it under the terms of the Lesser GNU General Public License as +* published by the Free Software Foundation, either version 3 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* and the Lesser GNU General Public License along with this program. +* If not, see . +*/ + + use std::{fmt::Debug, hash::Hash, marker, str::FromStr}; use pest::{iterators::Pair, Parser}; diff --git a/src/key_repr/key_representation.pest b/src/key_repr/key_representation.pest index 6527bde..444742c 100644 --- a/src/key_repr/key_representation.pest +++ b/src/key_repr/key_representation.pest @@ -1,3 +1,22 @@ +// Copyright (C) 2023 The Trinitrix Project +// +// This file is part of the Keymaps crate for Trinitrix. +// +// Keymaps is free software: you can redistribute it and/or modify +// it under the terms of the Lesser GNU General Public License as +// published by the Free Software Foundation, either version 3 of +// the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// and the Lesser GNU General Public License along with this program. +// If not, see . + + angular_bracket_open = _{ "<" } abo = _{ angular_bracket_open } angular_bracket_close = _{ ">" } diff --git a/src/key_repr/key_value/crossterm.rs b/src/key_repr/key_value/crossterm.rs index 178e860..eccc809 100644 --- a/src/key_repr/key_value/crossterm.rs +++ b/src/key_repr/key_value/crossterm.rs @@ -1,3 +1,24 @@ +/* +* Copyright (C) 2023 The Trinitrix Project +* +* This file is part of the Keymaps crate for Trinitrix. +* +* Keymaps is free software: you can redistribute it and/or modify +* it under the terms of the Lesser GNU General Public License as +* published by the Free Software Foundation, either version 3 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* and the Lesser GNU General Public License along with this program. +* If not, see . +*/ + + use crossterm::event::KeyCode; use super::KeyValue; diff --git a/src/key_repr/key_value/mod.rs b/src/key_repr/key_value/mod.rs index 61240d4..b1474fd 100644 --- a/src/key_repr/key_value/mod.rs +++ b/src/key_repr/key_value/mod.rs @@ -1,3 +1,24 @@ +/* +* Copyright (C) 2023 The Trinitrix Project +* +* This file is part of the Keymaps crate for Trinitrix. +* +* Keymaps is free software: you can redistribute it and/or modify +* it under the terms of the Lesser GNU General Public License as +* published by the Free Software Foundation, either version 3 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* and the Lesser GNU General Public License along with this program. +* If not, see . +*/ + + #[cfg(feature = "crossterm")] mod crossterm; diff --git a/src/key_repr/keys/mod.rs b/src/key_repr/keys/mod.rs index fc645b7..9535eb9 100644 --- a/src/key_repr/keys/mod.rs +++ b/src/key_repr/keys/mod.rs @@ -1,3 +1,24 @@ +/* +* Copyright (C) 2023 The Trinitrix Project +* +* This file is part of the Keymaps crate for Trinitrix. +* +* Keymaps is free software: you can redistribute it and/or modify +* it under the terms of the Lesser GNU General Public License as +* published by the Free Software Foundation, either version 3 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* and the Lesser GNU General Public License along with this program. +* If not, see . +*/ + + use pest::Parser; use pest_derive::Parser; diff --git a/src/key_repr/mod.rs b/src/key_repr/mod.rs index 925038e..fa2a16b 100644 --- a/src/key_repr/mod.rs +++ b/src/key_repr/mod.rs @@ -1,3 +1,24 @@ +/* +* Copyright (C) 2023 The Trinitrix Project +* +* This file is part of the Keymaps crate for Trinitrix. +* +* Keymaps is free software: you can redistribute it and/or modify +* it under the terms of the Lesser GNU General Public License as +* published by the Free Software Foundation, either version 3 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* and the Lesser GNU General Public License along with this program. +* If not, see . +*/ + + pub mod key; pub mod key_value; pub mod keys; diff --git a/src/lib.rs b/src/lib.rs index ab1be33..bb8ec2f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,24 @@ +/* +* Copyright (C) 2023 The Trinitrix Project +* +* This file is part of the Keymaps crate for Trinitrix. +* +* Keymaps is free software: you can redistribute it and/or modify +* it under the terms of the Lesser GNU General Public License as +* published by the Free Software Foundation, either version 3 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* and the Lesser GNU General Public License along with this program. +* If not, see . +*/ + + pub mod key_repr; pub mod trie; pub mod error; diff --git a/src/trie.rs b/src/trie.rs index 87b4671..f0a4048 100644 --- a/src/trie.rs +++ b/src/trie.rs @@ -1,3 +1,24 @@ +/* +* Copyright (C) 2023 The Trinitrix Project +* +* This file is part of the Keymaps crate for Trinitrix. +* +* Keymaps is free software: you can redistribute it and/or modify +* it under the terms of the Lesser GNU General Public License as +* published by the Free Software Foundation, either version 3 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* and the Lesser GNU General Public License along with this program. +* If not, see . +*/ + + use std::collections::HashMap; use log::info;