diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-04-06 18:36:27 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-04-06 18:38:03 +0200 |
commit | a9db63802db2293ac4ee280394568b09f6feaa87 (patch) | |
tree | 32b00aa17fda1bf11bf87fdefa71b77d2bc44348 /pkgs/by-name/ts/tskm/src/main.rs | |
parent | fix(modules/taskwarrior/mkHook): Use correct `grep` silencing argument (diff) | |
download | nixos-config-a9db63802db2293ac4ee280394568b09f6feaa87.zip |
feat(pkgs/tskm/task): Use taskchampion instead of run_task
Diffstat (limited to '')
-rw-r--r-- | pkgs/by-name/ts/tskm/src/main.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/by-name/ts/tskm/src/main.rs b/pkgs/by-name/ts/tskm/src/main.rs index 7fc9c0d4..6e506895 100644 --- a/pkgs/by-name/ts/tskm/src/main.rs +++ b/pkgs/by-name/ts/tskm/src/main.rs @@ -3,12 +3,14 @@ use anyhow::Result; use clap::Parser; +use state::State; use crate::interface::{input, neorg, open, project}; pub mod cli; pub mod interface; pub mod rofi; +pub mod state; pub mod task; use crate::cli::{CliArgs, Command}; @@ -55,10 +57,12 @@ fn main() -> Result<(), anyhow::Error> { .init() .expect("Let's just hope that this does not panic"); + let mut state = State::new_rw()?; + match args.command { Command::Inputs { command } => input::handle(command)?, - Command::Neorg { command } => neorg::handle(command)?, - Command::Open { command } => open::handle(command)?, + Command::Neorg { command } => neorg::handle(command, &mut state)?, + Command::Open { command } => open::handle(command, &mut state)?, Command::Projects { command } => project::handle(command)?, } |