From 6c1f80038bf48bdc6f21d7349a2555b5bb9a4afa Mon Sep 17 00:00:00 2001 From: Brent Westbrook Date: Sun, 19 Jan 2025 19:13:19 -0500 Subject: [PATCH] tidy up for release --- scripts/keysyms.py | 5 +++-- src/config.rs | 6 +++--- src/config/{fig_env.rs => env.rs} | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) rename src/config/{fig_env.rs => env.rs} (99%) diff --git a/scripts/keysyms.py b/scripts/keysyms.py index 1867a16..ee206e8 100644 --- a/scripts/keysyms.py +++ b/scripts/keysyms.py @@ -1,6 +1,7 @@ """Generate a table of X keysyms for inclusion in the Lua config file -environment. This should be included in `fig_env.rs` to take advantage of the -`use x11::keysym::*` and `keys` macros that are used in the generated output. +environment. This should be included in `config/env.rs` to take advantage of +the `use x11::keysym::*` and `keys` macros that are used in the generated +output. """ import textwrap diff --git a/src/config.rs b/src/config.rs index 367fc9a..3c3467e 100644 --- a/src/config.rs +++ b/src/config.rs @@ -6,12 +6,12 @@ use std::{ path::Path, }; -use fig_env::{CLICKS, HANDLERS, KEYS, XKEYS}; +use env::{CLICKS, HANDLERS, KEYS, XKEYS}; use mlua::{Lua, LuaSerdeExt as _, Table}; use crate::{config::key::Key, enums::Scheme, Button, Layout, Rule}; -mod fig_env; +mod env; pub mod key; #[derive(Debug, serde::Deserialize)] @@ -137,7 +137,7 @@ impl ConfigBuilder { globals.set(k, v).unwrap(); } - for (k, v) in fig_env::BUTTONS { + for (k, v) in env::BUTTONS { globals.set(k, v).unwrap(); } diff --git a/src/config/fig_env.rs b/src/config/env.rs similarity index 99% rename from src/config/fig_env.rs rename to src/config/env.rs index f442ccf..b5f12ea 100644 --- a/src/config/fig_env.rs +++ b/src/config/env.rs @@ -1,5 +1,5 @@ -//! Build an initial Fig environment containing useful symbols for writing -//! your config +//! Build sequences of key-value pairs containing useful symbols to include in +//! the initial Lua environment for writing your config. use crate::enums::Clk; use x11::xlib::{