App architecture modifications.
Now GUI and the app itself is divided into two different binaries. The app also provides system tray icon. Whereas the GUI can be used to configure the app.
This commit is contained in:
parent
ea489d5719
commit
1323505b0a
232 changed files with 5059 additions and 8081 deletions
46
app/src/commands/structs.rs
Normal file
46
app/src/commands/structs.rs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
use serde::Deserialize;
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct AssistantCommand {
|
||||
pub path: PathBuf,
|
||||
pub commands: CommandsList,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
pub struct CommandsList {
|
||||
pub list: Vec<Config>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
pub struct Config {
|
||||
pub command: ConfigCommandSection,
|
||||
|
||||
pub voice: ConfigVoiceSection,
|
||||
|
||||
pub phrases: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
pub struct ConfigCommandSection {
|
||||
pub action: String,
|
||||
|
||||
#[serde(default)]
|
||||
pub exe_path: String,
|
||||
|
||||
#[serde(default)]
|
||||
pub exe_args: Vec<String>,
|
||||
|
||||
#[serde(default)]
|
||||
pub cli_cmd: String,
|
||||
|
||||
#[serde(default)]
|
||||
pub cli_args: Vec<String>
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
pub struct ConfigVoiceSection {
|
||||
|
||||
#[serde(default)]
|
||||
pub sounds: Vec<String>,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue