tools

various tools I have been using throughout the years
Log | Files | Refs | README | LICENSE

commit c9b5b285625266bafbc8b61cf7f3458aaf04f835
parent 7e8ff70cdb48f088cb93e8bce70fa1f8ba1e788b
Author: mtmn <miro@haravara.org>
Date:   Fri, 10 Apr 2026 01:22:38 +0200

chore: remove alafont

Former-commit-id: d2d9e22e1be38a03bf467b489859831f776a06af
Former-commit-id: b58c33d3f6788f6c43a1796c400713ab74ac0b5f
Former-commit-id: eebf96770c44c63b7f8cf7ccb8e1b65537e2fd94
Diffstat:
MCargo.toml | 1-
MMODULE.bazel | 1-
Dalafont/BUILD | 7-------
Dalafont/Cargo.toml | 8--------
Dalafont/src/main.rs | 43-------------------------------------------
5 files changed, 0 insertions(+), 60 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml @@ -1,7 +1,6 @@ [workspace] resolver = "2" members = [ - "alafont", "diffamer", "hakunadata", "lastfm-csv-export", diff --git a/MODULE.bazel b/MODULE.bazel @@ -48,7 +48,6 @@ crate.from_cargo( name = "crates", cargo_lockfile = "//:Cargo.lock", manifests = [ - "//:alafont/Cargo.toml", "//:diffamer/Cargo.toml", "//:hakunadata/Cargo.toml", "//:mack/Cargo.toml", diff --git a/alafont/BUILD b/alafont/BUILD @@ -1,7 +0,0 @@ -load("@crates//:defs.bzl", "all_crate_deps") -load("//bazel:rust.bzl", "rust_app") - -rust_app( - name = "alafont", - deps = all_crate_deps(), -) diff --git a/alafont/Cargo.toml b/alafont/Cargo.toml @@ -1,8 +0,0 @@ -[package] -name = "alafont" -version = "0.1.0" -edition = "2024" - -[dependencies] -clap = { version = "4.5", features = ["derive"] } -toml_edit = "0.25" diff --git a/alafont/src/main.rs b/alafont/src/main.rs @@ -1,43 +0,0 @@ -use std::fs; -use std::path::PathBuf; -use clap::Parser; -use toml_edit::{DocumentMut, value}; - -#[derive(Parser, Debug)] -#[command(name = "alacritty_font")] -struct Args { - #[arg(short, long)] - font: String, - - #[arg(short, long)] - size: f64, - - #[arg(short, long)] - config: Option<PathBuf>, -} - -fn main() -> Result<(), Box<dyn std::error::Error>> { - let args = Args::parse(); - - let config_path = if let Some(path) = args.config { - path - } else { - let home = std::env::var("HOME")?; - PathBuf::from(home).join(".config/alacritty/alacritty.toml") - }; - - let content = fs::read_to_string(&config_path)?; - let mut doc = content.parse::<DocumentMut>()?; - - doc["font"]["size"] = value(args.size); - - doc["font"]["normal"]["family"] = value(&args.font); - doc["font"]["bold"]["family"] = value(&args.font); - doc["font"]["italic"]["family"] = value(&args.font); - - fs::write(&config_path, doc.to_string())?; - - println!("Updated font to '{}' with size {}", args.font, args.size); - - Ok(()) -}