Skip to content

Commit

Permalink
chore: rename project to daktilo
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Sep 24, 2023
1 parent a920c0c commit 3fbbb70
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,5 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.build.OS }}-${{ matrix.build.TARGET }}-assets
path: target/debug/typewriter*
name: daktilo-${{ matrix.build.TARGET }}-assets
path: target/debug/daktilo*
40 changes: 20 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "typewriter"
name = "daktilo"
version = "0.1.0"
description = "Turn your keyboard into a typewriter"
edition = "2021"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub struct Args {
#[arg(short, long, env)]
pub preset: Option<String>,
/// Sets the configuration file.
#[arg(short, long, env = "TYPEWRITER_CONFIG", value_name = "PATH")]
#[arg(short, long, env = "DAKTILO_CONFIG", value_name = "PATH")]
pub config: Option<PathBuf>,
/// Writes the default configuration file.
#[arg(short, long)]
Expand Down
14 changes: 7 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ use clap::Parser;
use std::{fs, process};
use tracing::Level;

use typewriter::args::Args;
use typewriter::config::{Config, DEFAULT_CONFIG};
use typewriter::embed::EmbeddedConfig;
use typewriter::error::{Error, Result};
use typewriter::logger;
use daktilo::args::Args;
use daktilo::config::{Config, DEFAULT_CONFIG};
use daktilo::embed::EmbeddedConfig;
use daktilo::error::{Error, Result};
use daktilo::logger;

#[tokio::main]
async fn main() -> Result<()> {
Expand All @@ -33,14 +33,14 @@ async fn main() -> Result<()> {
};
tracing::debug!("{:#?}", config);

// Run the typewriter.
// Start the typewriter.
let preset_name = args.preset.unwrap_or_else(|| String::from("default"));
let preset = config
.sound_presets
.into_iter()
.find(|v| v.name == preset_name)
.ok_or_else(|| Error::PresetNotFound(preset_name))?;
match typewriter::run(preset).await {
match daktilo::run(preset).await {
Ok(_) => process::exit(0),
Err(e) => {
tracing::error!("error occurred: {e}");
Expand Down

0 comments on commit 3fbbb70

Please sign in to comment.